Suggestions
Server ComponentHorizontal row of prompt suggestion chips.
Import
tsx
import { Suggestions } from "@cronus-ui/ui";
bash
npx cronus-ui add suggestion
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component SuggestionDefault layout:inline style:suggestion {
label "default"
text "What is Cronus?"
text "How do I deploy?"
text "Show an example"
}
page "/audit/suggestion/default" type:custom {
use SuggestionDefault
}
API Reference
Generated from the component's exported types.
SuggestionsLabels
| Prop | Type | Default | Description |
|---|---|---|---|
suggestions* | string | — | — |
SuggestionsProps
Extends HTMLAttributes<HTMLElement>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLElement> | — | Ref forwarded to the underlying DOM node. |
labels | Partial<SuggestionsLabels> | — | Override default English strings. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
SuggestionProps
Extends Omit<ButtonProps, "onClick">
| Prop | Type | Default | Description |
|---|---|---|---|
suggestion* | string | — | — |
onClick | (suggestion: string) => void | — | — |
variant | string | — | Visual variant. |
size | string | — | Control size. |
asChild | boolean | — | Render as the child element via Slot. |
disabled | boolean | — | Disables pointer and keyboard interaction. |
type | string | — | Native type of the underlying element. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |