21st Registry

Publish components, themes, and templates to 21st.dev - manage your published work

This is a skill for AI agents. Install for Cursor, Claude, Codex, and other agents with npx oli-skills install 21st-registry.

  • Cursor reads .cursor/skills/ and the rule created by npx oli-skills init.
  • Claude Code reads .claude/skills/.
  • Codex reads .codex/skills/ and .agents/skills/.

Source: 21st

/21st-registry@21st-registry

Publish components, themes, and templates to 21st.dev - manage your published work

Publish your own React components to the 21st.dev registry, manage existing items, and curate your profile page.

Auth

# Component publishing: login OR API key
21st login
# Or: export TWENTYFIRST_TOKEN=21st_sk_...

# Theme/template: API key required
# Get at: https://21st.dev/settings/api-keys

Find Existing Work

21st components                              # All your components + drafts
21st components --status draft --scope personal
21st open component:123                      # Resume editing
21st open draft:<uuid>                       # Resume draft

Publish a Component

21st publish ./path/to/Component.tsx \
  --to default \
  --description "1-2 sentences: what it does and when to use it"

Flags

FlagPurpose
--description "..."Required, 10+ chars
--name, --slugOverride auto-detected
--tags a,b,c1-5 tags
--demo <file>Demo file (auto-found if not specified)
--to <library>Target team library
--visibility published|privateAccess level
--no-openPrint URL without opening browser

Demo with Live Controls

Add a settings object + props to get a live knobs panel:

const settings = {
  particleCount: 1000,
  speed: 0.4,
  showGrid: true,
  glowColor: "#7dd3fc",
}

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props }
  return <MyComponent count={s.particleCount} speed={s.speed} />
}
Value TypeControl
numberslider
booleanswitch
CSS colorcolor picker
color arraypalette editor
short stringtext field

Before Publishing

  1. Make component self-contained (all deps in package.json)
  2. Use semantic tokens (bg-primary, text-foreground)
  3. Review in CLI Review - check all demos, light/dark themes
  4. Wait for generated cover before final publish

Publish a Theme

21st publish-theme ./my-theme.css \
  --name "Midnight" \
  --tags dark,minimal

Theme CSS must have both :root and .dark blocks.

Publish a Template

21st publish-template "SaaS Starter" \
  --site https://demo.example.com \
  --preview https://example.com/thumb.png \
  --description "..." \
  --price 49 \
  --buy-url https://...

Edit & Delete

# Edit metadata
21st edit component:<id> --type component --description "..." --tags a,b
21st edit <id> --type theme --name "New Name" --visibility public

# Delete (requires --yes)
21st delete component:<id> --type component --yes
21st delete <id> --type theme --yes

Catalog Submission

21st submit <slug>              # Submit for featuring
21st withdraw <slug>            # Cancel submission
21st remove-from-catalog <slug> # Remove from catalog

Profile Page (Bento Board)

21st profile get [--json]           # Read current board
21st profile set --file board.json  # Replace board
21st profile set --clear            # Revert to classic
21st profile upload ./cover.png     # Upload media

Board block types: component, library, social, note, hire, image, divider

Skills Mixer