#901
Responsive keyboard hint
Two outlined neutral Buttons (Next lead, Snooze) with a Kbd keyboard hint in the trailing slot, marked trailingHint so the hint disappears below md and on touch screens without leaving a gap.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Responsive keyboard hint" pattern (@codeatlasdev/ui demo #901, inputs/button) in my app.
Call get_demo({ ids: ["#901"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Queue and inbox actions that show a keyboard shortcut on desktop only.
Keep these library parts, with the props and tokens the demo uses:
- Button, Kbd from "@codeatlasdev/ui"
Behaviour to keep:
- `<Button variant="outlined" tone="neutral" trailingHint>` labelled Next lead with a `trailing` snippet holding `<Kbd>K</Kbd>`
- A second one labelled Snooze with `<Kbd>S</Kbd>`
- Wrapping flex `.row` with `gap: var(--ca-space-3)`
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
How it is built
- `<Button variant="outlined" tone="neutral" trailingHint>` labelled Next lead with a `trailing` snippet holding `<Kbd>K</Kbd>`
- A second one labelled Snooze with `<Kbd>S</Kbd>`
- Wrapping flex `.row` with `gap: var(--ca-space-3)`
Related
Loading source.