Sources
Server ComponentExpandable list of sources the model used.
Import
tsx
import { Sources } from "@cronus-ui/ui";
bash
npx cronus-ui add sources
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 SourcesDefault layout:inline style:sources {
count:2
label "default"
link "Cronus docs" -> "https://cronus.dev/docs"
link "Release notes" -> "https://cronus.dev/changelog"
}
page "/audit/sources/default" type:custom {
use SourcesDefault
}
API Reference
Generated from the component's exported types.
SourcesProps
Extends ComponentProps<typeof Collapsible>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLDivElement> | — | Ref forwarded to the underlying DOM node. |
open | boolean | — | Controlled open state. |
defaultOpen | boolean | — | Uncontrolled initial open state. |
onOpenChange | (open: boolean) => void | — | Called when the open state changes. |
children | ReactNode | — | Contents of the component. |
disabled | boolean | — | Disables pointer and keyboard interaction. |
SourcesTriggerLabels
| Prop | Type | Default | Description |
|---|---|---|---|
usedSources* | string | — | — |
SourcesTriggerProps
Extends ComponentProps<typeof CollapsibleTrigger>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLButtonElement> | — | Ref forwarded to the underlying DOM node. |
count* | number | — | — |
labels | Partial<SourcesTriggerLabels> | — | Override default English strings. |
asChild | boolean | — | Render as the child element via Slot. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
SourcesContentProps
Extends ComponentProps<typeof CollapsibleContent>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLDivElement> | — | Ref forwarded to the underlying DOM node. |
forceMount | boolean | — | Keep the node mounted when closed, for exit animation. |
asChild | boolean | — | Render as the child element via Slot. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
SourceProps
Extends ComponentProps<"a">
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLAnchorElement> | — | Ref forwarded to the underlying DOM node. |