Suggestion
Offers a proposed next move the reader can take, such as a follow-up prompt or a task lane.
Configurations
Supported configurations for this component.
States
Interaction states covered by the API and the style contract.
Configurations
3 examplesStates
3 examplesAdd to your project
One command adds this component to your project.
Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.
npx shadcn@latest add @aicanvas/••••••••••••Light and dark both come with the install and follow the dark class on <html>, the shadcn dark mode setup (next-themes with attribute="class").
Props
Every prop this component accepts. Any other prop is forwarded to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
| childrenreq | React.ReactNode | - | The suggestion's label. |
| icon | React.ComponentType | - | Phosphor icon before the label, on the rung's size. |
| size | 'sm'|'md' | 'sm' | Control rung: 28 / 32px tall, 12 / 14px label, 16 / 18px glyph. |
| selected | boolean | - | Taken: the dashed frame turns solid with the selection border and tint. Passed (true or false), it sets aria-pressed and the suggestion is a toggle, a lane that can be taken; left unset, there is no aria-pressed and it is a plain button, a one-shot follow-up. |
| onClick | () => void | - | Handler called when the element is clicked. |
| className | string | - | Additional CSS classes applied to the root element. |
| style | React.CSSProperties | - | Inline styles applied to the root element. |