cubeui

A shadcn registry of 116 items, authored in React Native and compiled to plain DOM components. One palette, one component vocabulary, two platforms — and no react-native-web in the web half.

See it

Every item, drawn on one page per platform: scroll it instead of opening a story at a time.

Both are stories in the Storybook, under Gallery, where each item also has stories of its own with its props and its tests.

And the same items composed into whole screens, to judge them in context rather than one at a time. Each is a story under Examples, with its loading, empty and failed states a control away.

Install

Add one line to your components.json. The item names are the same on both sides — card is card — and the URL is what decides which half you get.

// a DOM app
"registries": { "@cubeui": "https://cubicecho.github.io/cubeui/r/{name}.json" }

// an Expo app
"registries": { "@cubeui": "https://cubicecho.github.io/cubeui/r/native/{name}.json" }
npx shadcn@latest add @cubeui/tokens @cubeui/button

@cubeui/tokens is the one every consumer installs: it is the palette, emitted from a single source as oklch() for the DOM and as hex for React Native, whose style engine cannot parse oklch() at runtime.

On a Vite app, put compilerOptions.paths in the root tsconfig.json too. npm create vite writes them into tsconfig.app.json; the shadcn CLI reads only the root file, finds no @/ alias, and resolves it as a relative path — so the install writes a literal @/ directory at your project root and reports success.
Upgrading from the web-only cubeui? @cubeui/form is now the Form component, installed at components/ui/form.tsx; the old bundle of form items is @cubeui/form-set. The primitives now install over shadcn's own. The migration notes list every change.

Items

102 on both platforms · 14 web-only · 0 native-only. Anything not marked both has no half on the other platform.

ItemPlatformsWhat it is
@cubeui/alert both A callout: a tinted, bordered box with an icon, a title, a line under it and an optional action. `default`, `info`, `warning` or `destructive`; only `destructive` is announced as an `alert`, the rest as a polite `status`.
@cubeui/alert-dialog both shadcn's modal that interrupts to ask, with the same part names on both halves: radix's `AlertDialog` on the web, the native `Dialog` as an `alertdialog` with no close button on device.
@cubeui/app-bar both An app's bar across the top: brand at the start, its places in a named navigation landmark that scrolls sideways when narrow, one line of the app's state that gives way first, and actions at the end. The bar SidebarLayout draws on a phone, and the header of an app with no sidebar.
@cubeui/app-form web The TanStack Form binding: useAppForm, plus one-element fields — InputField, NumberField, TextareaField, SelectField, ComboboxField, CheckboxField, SwitchField, PasswordField — that take the form and a checked field name instead of a render prop, and SubmitButton.
@cubeui/badge both A pill naming what something is or what state it is in — and, with no label, the dot that says the same thing in a tighter row. `onRemove` adds a trailing ✕ for a tag the user can take off.
@cubeui/bottom-bar both Whether a layout draws a bar along the bottom of the screen, and under which width: useReportBottomBar for the layout that draws it, useBottomBar for what floats at the bottom (a toast) to sit above it.
@cubeui/button both A Pressable-backed button whose variants split into container and text halves, because native inherits no text colour. An `icon*` size requires an `aria-label`; a `hint` is its tooltip, and with one, `disabled` is `aria-disabled`, so the reason is still reachable.
@cubeui/calendar both A month of single-date selection: react-day-picker on web, a date-fns grid on device.
@cubeui/card both A card with typed text slots, an optional accent bar, and a whole-card press target that stays reachable by keyboard.
@cubeui/card-layout both A card with its slots already placed: icon, title, description, header action, body, and a footer split between prose and buttons. `descriptionPlacement="popover"` folds the description behind a button after the title.
@cubeui/centered-card-layout both A page that is one card, centred both ways: a sign-in, a token gate, a check-your-email screen. Full height, padded off the edges, a `max-w-sm` `CardLayout` taking every card slot; on device a scroll view that keeps the form above the keyboard.
@cubeui/centered-layout both The old name of centered-card-layout, kept for one release: CenteredLayout, re-exported from it. Install centered-card-layout.
@cubeui/checkbox both Radix on web, with its whole prop surface; a Pressable announced through role and aria-checked on device. Controlled or uncontrolled on both.
@cubeui/code both Monospaced text: Code, the inline span, and CodeBlock, a bordered block of preformatted text with an action slot for a CopyButton, an optional title (and language) in a header row, a wrap prop to wrap long lines instead of scrolling sideways, a maxHeight that scrolls, and follow to keep a growing log at its end.
@cubeui/collapsible both A titled part of a screen whose body shows and hides: "Show completed (3)", "Raw output". The header is one button with a turning chevron and `aria-expanded`, an optional `actionSlot` sits beside it rather than inside it, and `contentSlot` is mounted only while open. Uncontrolled with `defaultOpen`, or controlled with `open`/`onOpenChange`.
@cubeui/collapsible-row both A list row that opens: a `ListItem` whose whole heading is `Collapsible`'s button (`aria-expanded`, a turning chevron), with the actions outside it and `contentSlot` under it, mounted only while open. The same box and words as the `ListItem` rows beside it, and no surface of its own. Controlled with `open`/`onOpenChange`.
@cubeui/color both Derives an accent that shows on light and dark cards from a user-chosen hex colour.
@cubeui/color-bar both The left-edge accent stripe a card wears, readable in both themes and labelled for anyone who cannot see it.
@cubeui/color-dot both A small swatch standing in for a colour-coded thing in a list, readable in both themes.
@cubeui/color-field web A colour picker as one line, over a field the compiler checked holds a string.
@cubeui/color-picker both Swatches plus a hex field, replacing `<input type="color">` — which has no native counterpart.
@cubeui/color-picker-field both `ColorPicker` bound to a hex-string form field, its swatch row named by the field's label. `ColorField`, under an item name that does not collide with the web-only `color-field`.
@cubeui/combobox both A choice from a list of options, one value or several with `multiple`, with groups, separators and notes, and the id and aria props landing on the trigger. One value is radix's listbox on the web and the Select sheet on device; `searchable` and `multiple` draw a Popover over a Command, searchable on every word, with an optional create row and, for several, coloured chips.
@cubeui/combobox-field both `Combobox` bound to a form field, for `createAppForm` or inside `form.AppField`: a string field, or a `string[]` one with `multiple`. The choice with a search box, a list that fills when it opens, a note in it, or several values. `ComboboxField`, kept out of `form` so a form of plain inputs does not install the popover and the command list.
@cubeui/command both A searchable list of choices: shadcn's Command parts over cmdk on web (arrow keys, Enter, fuzzy ranking); on device a search Input over pressable rows, filtered on every typed word, chosen by press. The same part names and the props Combobox uses on both.
@cubeui/confirm both One confirmation prompt for both platforms, as a promise: `if (await confirm({…})) remove()`.
@cubeui/confirm-button both A destructive button that asks first, with a required description of what is lost: a `Button` that opens `ConfirmDialog`, with `requireText` to ask for the name before a big delete.
@cubeui/confirm-dialog both A destructive-action confirmation dialog: Cancel plus one destructive button.
@cubeui/control web Every cubeui control in one install.
@cubeui/copy-button both An icon button that copies `value` to the clipboard and turns into a tick for a moment, named `Copy` (or `label`, or `Copy {title}` inside a titled CodeBlock) and then `Copied`.
@cubeui/date-field web A date and a date range as one line each, over fields the compiler checked hold a Date and a DateRange.
@cubeui/date-picker both A date and optionally a time behind a popover, plus a range picker that closes when the range is complete. Clearing is a real button, not one nested in another.
@cubeui/date-time-field both `DateTimeInput` bound to a `Date | null` form field, named by its label and its date: "Due September 15th, 2026". Its own item for the weight of the calendar.
@cubeui/date-time-input both A date popover and a time field that commit one Date back — or, with `clearable mode="date"`, an optional date only.
@cubeui/description-hint both A description folded behind a small button beside its title: the button and pane, both named `About <label>`, and the off-screen copy `aria-describedby` still reaches on the web. What `descriptionPlacement="popover"` draws on the bound fields, `CardLayout`, `Section` and `SettingRow`.
@cubeui/description-list both The old name of property-list, kept for one release: DescriptionList and PropertyRow, re-exported from it. Install property-list.
@cubeui/dialog both A modal. Radix on web with its focus trap and scroll lock; a transparent native Modal with a dimmed backdrop and a centred card.
@cubeui/dialog-layout both A dialog whose body scrolls under a header that does not, and which asks before closing on unsaved work. Composes the header/content/footer chassis rather than owning a second copy.
@cubeui/disclosure both The old name of collapsible, kept for one release: Disclosure and DisclosureTrigger, re-exported from it. Install collapsible.
@cubeui/disclosure-row both The old name of collapsible-row, kept for one release: DisclosureRow, re-exported from it. Install collapsible-row.
@cubeui/download-button both An icon button that saves `source` as a file named `filename`, disabled with a spinner while a fetched `source` is pending, and `downloadBlob()`, the function it calls. The browser's own download on the web; on device the share sheet or a folder the person picks, chosen by `destination` or, by default, from a menu on the button.
@cubeui/empty both shadcn's `Empty` parts on both halves: the muted icon bubble, the title, the line under it and what to do about it. The one-line shell built on them is `EmptyState`, in `@cubeui/empty-state`; write that in new code.
@cubeui/empty-state both What an empty list says: the centred icon, title, description and action for a list that is the page, or at `compact` one muted line for a list inside a card, sidebar or popover. Built on `@cubeui/empty`'s parts.
@cubeui/error-message both The words an error is shown in: `messageOf`, the text a validator's error shows, which the form bindings read a field's first error with; and `describeError`, a failed request or a thrown value as one line worth reading, which `LoadError` and `ErrorPage` say under their heading.
@cubeui/error-page both What shows when the tree below a route has thrown, with nothing in it that could have been the cause. The whole error boundary in one element: `@cubeui/empty`'s block with a red bubble, a title, the line `describeError` gives, an optional copyable raw message (`details`) and extra buttons beside Try again (`actionSlot`).
@cubeui/field both Label, description and error chrome around a control. The unbound half of the form set.
@cubeui/field-row web Fields side by side on one row, wrapping when they no longer fit rather than squeezing to a width the values no longer read at.
@cubeui/file-picker both A drop zone, or a button, over a hidden file input on web. The native half is a placeholder, not an implementation.
@cubeui/file-tree both A nested list of files and folders from a flat list of paths. A folder is a button that folds what is under it; a file is a router link (`linkSlot`) or a button (`onSelect`), tinted when it is `selected`. `meta` puts a size or a badge after a name, `actionSlot` puts rename and delete beside the row rather than inside it, `pinned` keeps a file above the tree, and `onMove` lets a row be dragged onto a folder in a browser.
@cubeui/form both Fields bound to TanStack Form: label, control and error wired once, for both platforms. `useAppForm`, the text, number, password, select, checkbox and switch fields, `SubmitButton`, and `bindToForm` for the rest. Every bound field takes `descriptionPlacement="popover"`, which folds the description behind a button beside the label.
@cubeui/form-binding both The types a control bound to a TanStack form field takes — the form, a checked field name, validators and listeners — and the one loosely typed view of `form.Field` that renders it. What the form items and RadioGroupField bind through.
@cubeui/form-element both A real `<form>` on web so Enter submits; a `View` on native, where nothing raises a submit event.
@cubeui/form-field web One field: a label wired to its control, a description that sits inline or behind a help icon, an error the control is described by, and a skeleton the right height for what is loading. Presentational, so the TanStack binding sits on it rather than beside it.
@cubeui/form-set web Every cubeui form component in one install, TanStack binding included. Named `form-set` rather than `form`: that name is the React Native `Form` component in this registry, and the shadcn CLI resolves a cross-item import by basename, so the two cannot share it.
@cubeui/format both How a count, a size in bytes, a duration and a date are written for a reader, and how a row of them is joined: formatCount, formatBytes, formatDuration, formatDate, formatDateTime, formatAgo and joinStats, on Intl with no dependency.
@cubeui/frame-focus-guard both Keeps a framed page from taking focus out of an open menu, dialog, popover or select: frames go inert while an overlay is open, and a window blur that only moved focus into one is stopped and focus put back. Held by those overlays' web halves; web only.
@cubeui/grid-layout both Equal cells in rows, one to four to a row by the window's width, for cards, tiles or anything of one kind.
@cubeui/header-content-footer both The page chassis: chrome that stays, a body that scrolls, floors that let it. Ships the sticky preset alongside the base.
@cubeui/icons both The icon set, per-icon imports on native and a tree-shaken barrel on web, with the context that gives native icons a colour to inherit.
@cubeui/input both Single-line text entry, with an optional icon at its start (`leadingSlot`) or an icon-sized control at its end (`trailingSlot`). Keeps a real DOM input on web so time, number and min/max survive; a TextInput on device.
@cubeui/item both shadcn's list-row parts — `Item`, `ItemMedia`, `ItemContent`, `ItemTitle`, `ItemDescription`, `ItemActions`, `ItemHeader`, `ItemFooter`, `ItemGroup`, `ItemSeparator` — on both halves, with shadcn's names and props. `size="default"` is shadcn's row; `size="sm"` is `ListItem`'s, which is built from these parts. For a row `ListItem` does not fit: a header or footer line, a badge beside the title.
@cubeui/label both A caption for a control. Radix on web so clicking it focuses the control; plain text on native, where that association does not exist.
@cubeui/layout web Every cubeui layout shell in one install.
@cubeui/list both The list a row sits in: a `<ul>` (list and listitem roles on device) that wraps each element of `contentSlot` in its own cell, with a `label` for its accessible name, a rule between rows (`divided`, on by default) and the padding around each row. Holds `ListItem`s, `DisclosureRow`s or rows of your own.
@cubeui/list-item both One row of a list: `leadingSlot` (an avatar, a checkbox), a truncating `title` over a `description`, `meta` and `actionSlot` at the far end. With `onPress` the middle is one button and `leadingSlot` and `actionSlot` stay separate controls beside it, never nested in it. Built from `Item`'s parts at `size="sm"`.
@cubeui/load-state both The three rungs a list of rows climbs before it is a list of rows — failed, pending, empty — or a detail screen before its record — failed, pending, not found — with the error card and the row placeholders exported on their own.
@cubeui/markdown web A Markdown string rendered from the theme's tokens and the registry's own primitives: a fenced block is a CodeBlock, a table the Table, a rule a Separator, a task item a read-only box in Checkbox's look. GitHub-flavoured, raw HTML never rendered, URLs filtered. Optional sections that fold by heading, wikilinks, and a resolveLink for links between an app's documents with the pending and broken looks built in.
@cubeui/markdown-code-editor web A Markdown source editor on CodeMirror 6, coloured from the theme's tokens: syntax highlighting, soft wrap, list continuation, undo history, a save key, and room for an app's own extensions. Heavy, so it is a default export to load with lazy(). The textarea markdown-editor is the light one.
@cubeui/markdown-editor web A Markdown source and its rendering: a textarea beside a Markdown preview, and a toggle between edit, split and preview that the caller may hold or leave to the component.
@cubeui/menu both A popover of actions: radix DropdownMenu on web (arrow keys, typeahead, focus back on the trigger); the popover's centred sheet with menu and menuitem roles on device. A row takes an icon, a label, a trailing node and a destructive colour, and the menu closes when one is chosen. Checkbox rows toggle and keep the menu open; radio rows in a group choose one and close it.
@cubeui/number-draft both What a number box holds while it is typed in: `parseNumber`, which reads `""`, `-` and `1e` as no number yet and never as `0` or `NaN`, and `numberText`, which draws the typed text while it still means the stored number. What the two form bindings' NumberField share.
@cubeui/overflows both useOverflows(): whether a box that scrolls has anything to scroll, so it is a tab stop only while it does, and the width its scrollbar takes as `--scrollbar-width`. Measured on the web; on device, which has no tab stops, always false. Table's container, HeaderContentFooter's body and a stacked SplitLayout hold it.
@cubeui/overlay both Where a tooltip or a toast is drawn on device: a layer over the app (OverlayHost, which ToastProvider draws) and one inside each Modal (OverlayLayer, which the dialog, popover, menu and select draw), so a ScrollView does not clip it and an open dialog does not cover it. Nothing on the web draws one: radix portals to <body> there.
@cubeui/page-header both The title block a page wears in a header slot: an optional trail, an icon and title at a chosen heading level, a description, the page's buttons at the far end, and a search or filter row beneath. Carries the inset the page chassis leaves it.
@cubeui/page-layout both A whole page: a PageHeader pinned above a body that scrolls under it, in a named column.
@cubeui/password-field web A password as one line, with a reveal button none of the nine hand-written password inputs has.
@cubeui/password-input both A password box with a reveal button that is named, changes its name, and does not submit the form: Input with type=password (secureTextEntry on device) and a show/hide button in its trailing slot.
@cubeui/popover both Radix anchored to its trigger on web; a centred native sheet on device, because anchoring is a pointer-era affordance.
@cubeui/primitive web The shadcn primitives cubeui publishes, so a change made here reaches every project.
@cubeui/progress both A horizontal bar showing how much of something is done: `role="progressbar"` with its value announced, `value` from 0 to `max` (100 by default) as shadcn's, clamped. `label` names it; `valueLabel` reads the value in words. With no value, a third of the track sweeps across it, and holds still in the middle under reduced motion.
@cubeui/property-list both Read-only facts: `PropertyList` over `PropertyRow`s, each a label, a value, an optional hint under the value and an optional action beside it. A `<dl>` of `<dt>`/`<dd>` groups on the web, `role="list"` on device; `layout="inline"` puts labels beside values and wraps to stacked when narrow.
@cubeui/query-state both The old name of load-state, kept for one release: QueryState, QueryError and RowSkeleton, re-exported from it. Install load-state.
@cubeui/radio-group both An exclusive choice, one source for both platforms: `row` (circle, label, description), `card` (a tile with an icon) or `segmented` (a full-width framed row, icon-only segments allowed), with one tab stop and arrow keys that move and select handled inside.
@cubeui/radio-group-field both A set of exclusive choices bound to a TanStack form field, the options on the page and each able to carry a line saying what it means. The group is named by its title through aria-labelledby.
@cubeui/readable-text-color both Picks black or white ink for text sitting on a colour the user chose, by WCAG contrast.
@cubeui/reduced-motion both useReducedMotion(): whether the reader's system asks for reduced motion, kept up to date as they change it. The `prefers-reduced-motion` media query on the web, AccessibilityInfo on device, where NativeWind's `motion-safe:` and `motion-reduce:` never match. For an animation written in script; the components already honour it.
@cubeui/route-error both The old name of error-page, kept for one release: RouteError, re-exported from it. Install error-page.
@cubeui/roving-focus both One tab stop for a set of options, with the arrow keys, Home and End moving between them: ARIA's roving tab stop, as RadioGroup, ColorPicker's swatches and the device half of Tabs share it. A hook, `useRovingFocus`, and `useRovingItem` for each option. Not a component.
@cubeui/search-input both A search box: Input with a Search icon inside at its start, type=search (a searchbox), named by `label` (default Search), and a named clear button while it holds text.
@cubeui/section both A heading over a group of fields or rows: title, description, an action at the far end and an optional rule. The title is a heading of rank `level` (2 by default), so a long settings page is navigable. `descriptionPlacement="popover"` folds the description behind a button beside the title.
@cubeui/section-heading both The small muted heading above a section of content, with an optional heading `level`.
@cubeui/segmented both A segmented control: the pill, with an optional icon before its label; the named row it sits in, which can hold the current value and drop the labels to icons under a width; and the two class helpers a router link needs instead.
@cubeui/segmented-field both A `SegmentedGroup` bound to a string form field: a few short choices as pills on the page, the row named by the field's label. For `createAppForm` or inside `form.AppField`.
@cubeui/select both A radix listbox under its trigger on web; the options in a Modal sheet on device, which is what every native platform does.
@cubeui/select-options both What a select's options list holds — options, a group heading on each, separators and notes — and the walk that turns the list into the runs a menu draws. What Combobox and the form's SelectField read one list through, with the helpers for a held value no option covers and for a typed name worth creating. Not a component.
@cubeui/separator both shadcn's one-pixel rule, `orientation` and `decorative` as shadcn's: hidden from assistive tech by default, a `role="separator"` with `decorative={false}`.
@cubeui/setting-row both One row of a settings page: a `title` and `description` at the start, the control that changes it in `actionSlot` at the end, dropping under the text when the row is too narrow for both. `actionSlot` may be a function handed the title's id, so a switch or select is named by the title through `aria-labelledby`. `descriptionPlacement="popover"` folds the description behind a button beside the title.
@cubeui/sidebar both An app's sidebar: a header, a body that scrolls and a footer on the page colour behind a rule, at a fixed width, with an optional titled list of rows and the nav row itself — a link with an icon, a truncating label, a count and aria-current on the active page. Ships AppBarItem, the same place as an icon-only link for an app bar: a required name that is also its tooltip, the count as a badge on the icon and a status as a dot. A controlled collapsed state folds the sidebar to a rail of icons, with SidebarCollapseButton and useSidebar for what the app puts in it.
@cubeui/skeleton both shadcn's loading placeholder: a rounded `bg-accent` block the caller sizes, pulsing on both halves (`animate-pulse` on the web, the same opacity curve in `Animated` on device), and still when the reader's system asks for reduced motion.
@cubeui/spinner both A loading indicator: the LoaderCircle glyph turning, one `role="status"` named by `label`, sized and coloured by `className`.
@cubeui/split-layout both Two panes side by side on a named width scale, with the floors that keep one wide child from pushing the other off the screen. Ships SidebarLayout, the preset for the common case where one pane is the screen and the other is beside it — and, with sidebarHideBelow, an AppBar (brand, nav, status, action) that stands in for a navigation rail on a narrow screen, with the nav along the bottom of the page under barPosition="bottom".
@cubeui/stat-tile both One number on a card: a `label`, a large tabular `value`, an optional `hint` under it and an `iconSlot` before the label. Given `onPress` the tile is a button, and with `selected` a toggle (`aria-pressed`) for the filter tile over a list. `loading` holds the figure's place.
@cubeui/surface-colors both useSurfaceColors(): the page and card colours of the theme a node is drawn in, as hex, read from the --background and --secondary it resolves: off its computed style on the web, through NativeWind on device. ColorBar and ColorDot hand them to hexToAccent, so a picked colour moves only as far as that theme needs.
@cubeui/switch both Radix on web; a Pressable track with a moving thumb on device, rather than RN's Switch, whose raw colour props would not follow the theme.
@cubeui/switch-field both A switch and its caption on one row, with the whole row in the hit target on both platforms.
@cubeui/table web shadcn's data table, re-published from here so the table every admin page draws is edited in one place: row and column headers scoped, and a container a keyboard can scroll when the columns do not fit.
@cubeui/tabs both Radix on web; a row of Pressables over a context on device. Controlled (value/onValueChange) or uncontrolled (defaultValue) on both. A trigger can carry an icon beside its label, in the tab's active or inactive colour, and a dot or a count at its far end as `trailingSlot`. A list with more tabs than fit scrolls sideways and keeps the selected tab in view.
@cubeui/textarea both Multi-line text entry. Keeps a real DOM textarea on web; a multiline TextInput on device. Takes a submit key, a ref, and maxRows to grow with its text.
@cubeui/theme-picker both Light, Dark and System as radio tiles, or with variant="compact" as a full-width row of icon-only radios for a sidebar or header, and useThemePreference(), which stores the choice and applies it: a class on <html> on the web, Appearance.setColorScheme on device, where the app passes its own storage. With palettes={PALETTE_PREFERENCES} it adds a palette choice beside the theme (default, or the dark-only monokai), stored by usePalettePreference() and applied as data-palette on <html> on the web and by PaletteProvider on device. THEME_PRE_PAINT_SCRIPT is the inline <script> that paints the stored theme and palette before React mounts.
@cubeui/toast both Transient messages for mutations fired outside a form — the failures that otherwise reach only the console.
@cubeui/toggle-chip both A small on/off pill — a filter chip, a day toggle, a swatch — with its colour split across container and label.
@cubeui/tokens both The palette as a Tailwind stylesheet, emitted from the same source as the native one so the two cannot drift.
@cubeui/tooltip both Radix on hover and focus on web; long-press on device, which is the platform's own way to ask what a control does.
@cubeui/tree both Nests a flat list of `/` paths into folders and files: a parent the list leaves out is added, and every level is sorted folders first and then by name. Each node keeps the entry it was built from, so a size or a count rides along. What `FileTree` draws.
@cubeui/unsaved-changes-guard both useUnsavedChangesGuard() and UnsavedChangesDialog: one question for the three ways out of a page with unsaved edits. It takes the app's router blocker as it comes (TanStack Router's or React Router's, with no router imported), guards the page's own Close button through leave(), and holds a beforeunload listener on the web while there are changes.
@cubeui/utils both The class merger every component calls, the hover and focus classes that have to be gated on platform, and the `webAs` declaration the RN→web compiler reads.

Storybook

Every item with a story is at cubicecho.github.io/cubeui/storybook/, rendered in a real browser — the same stories the test run drives, with the a11y addon set to fail rather than warn.

A consuming app can put them in its own sidebar with one entry, so someone reading Domain/UploadPanel can click through to the Button it is built from:

// .storybook/main.ts
refs: { cubeui: { title: "cubeui", url: "https://cubicecho.github.io/cubeui/storybook" } }
Composed stories render here, under these tokens. That makes them documentation, not a test of your theme — the question "does Button still pass contrast after our index.css override" is only answered by a story compiled in your app — which is what the -stories items are.

Installing @cubeui/<name>-stories puts that component's stories beside it in your tree, importing it as @/components/ui/<name>, so they render under your stylesheet and run as tests under your addon-vitest. They need Storybook 9 or later on @storybook/react-vite and declare no npm dependencies. Available for: badge, button, card, section-heading, segmented, sidebar, theme-picker, toggle-chip.

npx shadcn add @cubeui/button-stories