#001
Full width
Two buttons that stretch to the width of their container: a filled primary and an outlined cancel.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Full width" pattern (@codeatlasdev/ui demo #001, inputs/button) in my app.
Call get_demo({ ids: ["#001"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Stacked action pairs in forms, dialogs and bottom sheets where the buttons should span the column.
Keep these library parts, with the props and tokens the demo uses:
- Button from "@codeatlasdev/ui"
Behaviour to keep:
- `fullWidth` on `Button` makes it fill its parent
- Primary action keeps the default variant, secondary uses `variant="outlined"`
- Wrapper column is `max-width: 320px` with `gap: var(--ca-space-2)`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Button
@codeatlasdev/ui
How it is built
- `fullWidth` on `Button` makes it fill its parent
- Primary action keeps the default variant, secondary uses `variant="outlined"`
- Wrapper column is `max-width: 320px` with `gap: var(--ca-space-2)`
Related
Loading source.