ZUI

Search documentation

Find a page or a heading.

Installation

Set up an app to install items from this registry with the shadcn CLI.

The shadcn CLI installs every item. It reads the app's components.json to decide where each file goes and how its imports are written.

Create components.json

The items compose the Base UI build of shadcn's primitives, so style in components.json has to start with base-. A Radix style installs the Radix build of each primitive, and the items' imports do not match it. Each item is published under every base style: the primitives it composes come in the app's own style, and its own classes are drawn in nova. An app that has no components.json gets one on Base UI, in the style the header's Style picker shows, from:

bash

Add the zui registry

components.json names this registry under registries, beside the style the init wrote:

jsoncomponents.json

The CLI fills {style} from the app's style, so every item comes in that style. Without the entry an item can still be added by its URL, https://ui.zeroxsolutions.com/r/styles/base-nova/<name>.json. An item that uses another zui item installs only with this entry.

Install an item

bash

The CLI writes the item's files under the aliases in components.json and rewrites its imports to match. With the aliases init writes, Status Indicator lands in components/feedback/status-indicator.tsx, its tone type in lib/status-tone.ts, and the component imports them as @/lib/utils and @/lib/status-tone. With components set to @/shared/widgets, it lands in shared/widgets/feedback/status-indicator.tsx.

Each item places its files through the @components/, @lib/ and @hooks/ target placeholders, which the CLI reads from version 4.7.0. An older CLI writes them into a folder named @components at the project root, so install with 4.7.0 or later; shadcn@latest is.

Items that use other items

An item names each zui item it composes as @zui/<name>, and each shadcn primitive as @shadcn/<name>. The CLI fetches the first kind through the app's @zui entry, in the app's style, and the second from shadcn's registry. Editor Tab, for example, names @zui/unsaved-indicator and @shadcn/button.

Colours

An item that paints a status uses two colours shadcn's theme does not define, success and warning. It carries both as cssVars, and the CLI adds them to the CSS file components.json names: --color-success and --color-warning under @theme inline, and --success and --warning under :root and .dark. An item copied by hand needs the same entries, copied from the cssVars in its JSON.