#145
All sides
Four outlined buttons whose tooltips open on the top, right, bottom and left side.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "All sides" pattern (@codeatlasdev/ui demo #145, display/tooltip) in my app.
Call get_demo({ ids: ["#145"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Choosing the tooltip side so it does not cover neighbouring controls or run off the screen.
Keep these library parts, with the props and tokens the demo uses:
- Tooltip, Button from "@codeatlasdev/ui"
Behaviour to keep:
- `side="top"` with `content="Tooltip on top"`
- `side="right"` with `content="Tooltip on right"`
- `side="bottom"` with `content="Tooltip on bottom"`
- `side="left"` with `content="Tooltip on left"`
- Each trigger uses `{#snippet triggerChild(props)}` with `<Button variant="outlined" {...props}>`
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
- `side="top"` with `content="Tooltip on top"`
- `side="right"` with `content="Tooltip on right"`
- `side="bottom"` with `content="Tooltip on bottom"`
- `side="left"` with `content="Tooltip on left"`
- Each trigger uses `{#snippet triggerChild(props)}` with `<Button variant="outlined" {...props}>`
Related
Loading source.