#106
With title
Two alerts with a bold title above the body text: a success and an error.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "With title" pattern (@codeatlasdev/ui demo #106, display/alert) in my app.
Call get_demo({ ids: ["#106"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Notices that need a headline plus an explanation, such as save confirmations or failed sign-ins.
Keep these library parts, with the props and tokens the demo uses:
- Alert from "@codeatlasdev/ui"
Behaviour to keep:
- `severity="success"` with `title="Changes saved"`
- `severity="error"` with `title="Authentication failed"`
- Body text is passed as the alert children
- Wrapper `.col` has `max-width: 560px`
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Alert
@codeatlasdev/ui
How it is built
- `severity="success"` with `title="Changes saved"`
- `severity="error"` with `title="Authentication failed"`
- Body text is passed as the alert children
- Wrapper `.col` has `max-width: 560px`
Related
Loading source.