SUI Docs
SUI is a source-first system for React components and blocks. Browse the catalog, read the docs, and use the CLI to add components directly into your project.
CLI-first
A ready command surface for the `npx sui ...` workflow.
Registry-ready
A base layer for remote distribution through a JSON registry.
Source-first
The real component file can be taken directly from the code tab.
Docs-linked
Markdown sources are automatically turned into HTML pages.
Workflow
How SUI works
SUI is not just a component gallery. The catalog, markdown docs, and CLI install flow are designed to work together in a single workflow.
Catalog
The registry catalog exposes components and blocks in a machine-readable index.
Inspect
Each package has a detail document with dependencies, files, source paths, and download URLs.
Install
Teams can install through CLI (`npx sui add <name>`), shadcn-style endpoints, or direct downloads.
Compose
Components and blocks can be composed in your own project without runtime vendor lock-in.
Distribute
The backend serves CLI contract routes and shadcn-compatible routes from the same source catalog.
Compatibility
Supported frameworks
Built around React + Tailwind CSS, so it adapts anywhere React is part of the stack.
Next.js
Works with both App Router and Pages Router. The strongest path for credentials auth and source-first component workflows.
Vite + React
If Tailwind CSS and React are already configured, component files can be copied in directly with zero friction.
Remix / React Router
React-based pieces adapt well, with standard client/server boundaries for client-only components.
Astro + React
Source files can be used through a manual add workflow inside React islands.
CLI
CLI surface
StructUI packages can be installed from the sui command surface, backed by the registry API routes.
sui initInitialize SUI in a projectsui add <name>Add a component or blocksui search [query]Search the registrysui info <name>Inspect a package entrysui listList installed componentssui update [name]Update a component to latestsui registryView registry detailssui doctorDiagnose configuration issuessui versionPrint CLI versionsui helpShow usage informationBuilt areas
npx sui init
npx sui add button
npx sui add hero-section
npx sui info button
npx sui search pricingKey files
Install
Component and block install flows
You can install with CLI, inspect detail payloads, and download raw source files directly from the API.
# 1) List component packages
curl -s https://structui.com/api/registry/components/index.json | jq '.items[0]'
# 2) Inspect one package detail
curl -s https://structui.com/api/registry/components/button | jq '.files[0]'
# 3) Download source file directly
curl -L https://structui.com/api/registry/download/component/button -o button.tsx
# 4) CLI install
npx sui add button# 1) List block packages
curl -s https://structui.com/api/registry/blocks/index.json | jq '.items[0]'
# 2) Inspect one block package
curl -s https://structui.com/api/registry/blocks/hero-section | jq '.files[0]'
# 3) Download source file directly
curl -L https://structui.com/api/registry/download/block/hero-section -o hero-section.tsx
# 4) CLI install
npx sui add hero-sectionRegistry
Registry API contract
StructUI serves both a CLI contract and shadcn-compatible contract from the same package catalog.
/api/registry/index.jsonCombined CLI index for all package types.
/api/registry/components/index.jsonCLI index for component packages only.
/api/registry/blocks/index.jsonCLI index for block packages only.
/api/registry/components/:slugCLI detail payload for a single component package.
/api/registry/blocks/:slugCLI detail payload for a single block package.
/api/registry/download/:type/:slugDirect source file download endpoint.
/api/registry.jsonshadcn-style registry index.
/api/r/:slugshadcn-style registry item document.
{
"registryVersion": 1,
"updatedAt": "2026-03-19T00:00:00.000Z",
"message": "StructUI registry index generated successfully.",
"source": "StructUI Registry API",
"items": [
{
"name": "button",
"type": "component",
"version": "0.1.0",
"description": "Interactive button with multiple variants and sizes.",
"entrypoint": "components/button.json",
"dependencies": ["@radix-ui/react-slot", "class-variance-authority"],
"tags": ["action", "trigger", "form", "cta"]
},
{
"name": "hero-section",
"type": "block",
"version": "0.1.0",
"description": "Marketing hero section with CTA and headline content.",
"entrypoint": "blocks/hero-section.json",
"dependencies": [],
"tags": ["hero", "marketing", "landing"]
}
]
}{
"name": "button",
"type": "component",
"version": "0.1.0",
"title": "Button",
"description": "Interactive button with multiple variants and sizes.",
"dependencies": ["@radix-ui/react-slot", "class-variance-authority"],
"registryDependencies": [],
"tags": ["action", "trigger", "form", "cta"],
"files": [
{
"path": "button.tsx",
"sourcePath": "src/components/ui/button.tsx",
"target": "components/ui/button.tsx",
"content": "..."
}
],
"downloadUrl": "/api/registry/download/component/button",
"message": "Registry item generated successfully."
}{
"$schema": "https://ui.shadcn.com/schema/registry.json",
"name": "structui",
"homepage": "https://structui.com",
"updatedAt": "2026-03-19T00:00:00.000Z",
"items": [
{
"name": "button",
"type": "registry:ui",
"title": "Button",
"description": "Interactive button with multiple variants and sizes.",
"dependencies": ["@radix-ui/react-slot", "class-variance-authority"],
"registryDependencies": []
}
]
}{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "button",
"type": "registry:ui",
"title": "Button",
"description": "Interactive button with multiple variants and sizes.",
"dependencies": ["@radix-ui/react-slot", "class-variance-authority"],
"registryDependencies": [],
"files": [
{
"path": "button.tsx",
"type": "registry:ui",
"target": "components/ui/button.tsx",
"content": "..."
}
]
}Status
Current state
Known limitations
Recommended next steps
Component Docs
Markdown documentation
Generated from markdown files under docs/components.
Accordion
Use Accordion when content should stay compact until the user asks for more detail.
Avatar
Use Avatar to represent a user, team, workspace, or record with a recognizable visual identity.
Badge
Use Badge for lightweight status labels, metadata chips, and inline semantic markers.
Button
Use Button for primary and secondary actions across forms, dialogs, and pagelevel calls to action.
Input
Use Input for singleline text entry in forms, search bars, settings screens, and compact filters.
Select
Use Select when users should choose one value from a fixed set of known options.
Tabs
Use Tabs to switch between related content panels without forcing a route change.
Textarea
Use Textarea for freeform, multiline content such as descriptions, messages, notes, and support tickets.