Card Stack
A fanned stack of cards that cycles on click or keyboard.
Import
tsx
import { CardStack } from "@cronus-ui/ui";
bash
npx cronus-ui add card-stack
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 CardStackDefault layout:inline style:card-stack {
aria-label:"Stack"
label "Stack"
text "One"
text "Two"
}
page "/audit/card-stack/default" type:custom {
use CardStackDefault
}
API Reference
Generated from the component's exported types.
CardStackProps
Extends Omit<HTMLAttributes<HTMLElement>, "children">
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLElement> | — | Ref forwarded to the underlying DOM node. |
items* | CardStackItem[] | — | — |
labels | { region?: string; next?: string; } | — | Accessible name for the stack. Defaults to `"Card stack"`. |
className | string | — | Additional class names merged onto the root. |
id | string | — | DOM id of the root element. |