New advertisers: 50% off your first month with code FIRSTMONTHSee slots
fusengine avatar

fuse-shadcn-ui

Expert shadcn/ui guidance that detects Base UI or Radix UI and covers patterns, registries, theming, and migration.

version
1.0.23
GitHub stars
36

What it does

  • Adds the shadcn-ui-expert agent plus five skills: shadcn-components, shadcn-detection, shadcn-migration, shadcn-registries, and shadcn-theming
  • Covers component composition, registry and components.json setup, OKLCH design tokens, and dark/light mode CSS variables
  • Checks which primitive library a project uses (Base UI, Radix UI, or React Aria) before any component work or migration
  • Designed for projects that build or migrate shadcn/ui components between Radix UI and Base UI primitives

Add marketplace

/plugin marketplace add fusengine/agents

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install fuse-shadcn-ui@fusengine-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source
Documents component patterns for shadcn/ui on its three bases — Base UI (default since July 2026), Radix and React Aria — API differences, mapping between primitives (Dialog/Select/Tooltip/Accordion/Popover/Menu/Combobox), per-base component availability, and the three composition patterns (`render` for Base UI, `asChild` for Radix, trigger-wrapper children for React Aria).

Requires detecting the project's primitive first (shadcn-detection) and consulting the shadcn MCP for registry source instead of hand-writing component internals.

shadcn Components

Agent Workflow (MANDATORY)

Before component work, spawn agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Find existing components
  2. fuse-ai-pilot:research-expert - Verify component APIs via Context7
  3. mcp__shadcn__search_items_in_registries - Search available components

After: Run fuse-ai-pilot:sniper for validation.


Overview

FeatureDescription
Base UI primitivesDefault base for new projects since 2026-07-02 (base-* styles, @base-ui/react); init --defaults = Next.js template + nova preset on the base base = base-nova
Radix primitivesOriginal base (2023), still fully supported (radix-* styles, unified radix-ui package); init -b radix
React Aria primitivesThird base since 2026-07-17 (aria-* styles, react-aria-components); init -b aria
Component mappingSame shadcn wrapper names for Base UI and Radix; React Aria wrappers differ (see below)
API differencesrender vs asChild vs trigger wrapper, part naming, data attributes
cn importComponents import cn from the cn package (Sept 2026); lib/utils.ts is export { cn } from "cn"

Get base-specific docs, examples and API links from the CLI: {runner} shadcn@latest docs dialog --base aria (--base base|radix|aria, defaults to the project base). Component pages: /docs/components/{base|radix|aria}/<name>, each with a Composition tree.


Critical Rules

  1. ALWAYS detect primitive before component work (shadcn-detection)
  2. ALWAYS consult MCP before adding any component
  3. NEVER mix Base UI, Radix and React Aria APIs in same component
  4. MATCH composition pattern to detected primitive
  5. USE registry source as truth, not manual code

Architecture

components/ui/
├── dialog.tsx          # Adapted to detected primitive
├── select.tsx
├── accordion.tsx
└── ...

-> See dialog-example.md for complete component


MCP Usage (MANDATORY)

ALWAYS consult shadcn MCP before adding components:

mcp__shadcn__search_items_in_registries -> find component
mcp__shadcn__view_items_in_registries   -> view source
mcp__shadcn__get_add_command_for_items  -> get install command

Component Mapping Table

Primitive parts used inside components/ui/*.tsx (registry *-nova sources, ui.shadcn.com/r/styles/<style>/<name>.json):

ComponentRadix PartBase UI PartReact Aria Part
Dialog contentDialog.ContentDialog.PopupModal > Dialog
Dialog overlayDialog.OverlayDialog.BackdropModalOverlay
SelectSelect.ContentSelect.Positioner + Select.Popup (+ Select.List)Select + Popover > ListBox
TooltipTooltip.ContentTooltip.Positioner + Tooltip.PopupTooltipTrigger > Tooltip
AccordionAccordion.ContentAccordion.PanelDisclosureGroup > Disclosure > DisclosurePanel
PopoverPopover.ContentPopover.Positioner + Popover.PopupDialogTrigger > Popover
MenuDropdownMenu.ContentMenu.Positioner + Menu.PopupMenuTrigger > Popover > Menu
Comboboxnone (uses @base-ui/react Combobox)Combobox.*ComboBox + Popover > ListBox

Wrapper API at call sites (@/components/ui/*):

Wrapper usageBase UIRadixReact Aria
DialogDialog > DialogTrigger + DialogContentsame as Base UIDialogTrigger > Button + Dialog (no DialogContent)
Popover / Tooltip / DropdownMenuX > XTrigger + XContentsameXTrigger > Button + X (e.g. DropdownMenuTrigger > Button + DropdownMenu)
AccordiondefaultValue={["a"]}, multipletype="single" collapsible defaultValue="a", type="multiple"defaultExpandedKeys={["a"]}, allowsMultipleExpanded, items use id
Selectitems prop on Select, SelectItem valueSelectItem valueplaceholder on Select, SelectItem id
Comboboxitems + ComboboxList render functionsame as Base UIComboboxList children, renderEmptyState, ComboboxItem id
Events / stateonClick, disabled, open/onOpenChangesameonPress, isDisabled, isOpen/onOpenChange
Raw data attrsdata-open, data-starting-style, data-sidedata-state="open", data-sidedata-entering/data-exiting, data-placement, data-focused, data-pressed

Shared data-open: / data-closed: / data-checked: Tailwind variants (from shadcn/tailwind.css) match both [data-state=...] and [data-open].

Component Availability per Base

ComponentBase UIRadixReact Aria
Toast (@base-ui/react/toast, toast.add())yes (July 2026)no: use Sonnerno: use Sonner
Sonnerregistry item exists; docs route to Toastyesyes
Menubar, Navigation Menuyesyesno (r/styles/aria-nova/{menubar,navigation-menu}.json → 404)
Questionnaire (styled over @shadcn/react/questionnaire)yesyesyes
MessageScroller, Message, Bubble, Attachment, Marker (chat, June 2026)yesyesyes (docs pages exist)
Trace (add trace: Trace, TraceLine with status="running|error|pending", TraceIcon, TraceTitle; agent steps) and Code Block (add code-block: CodeBlock, CodeBlockHeader, CodeBlockTitle, CodeBlockActions, CodeBlockCopyButton, CodeBlockContent, CodeBlockLine, CodeBlockFooter; installs useHighlightedCode) (Oct 2026, all 8 styles)yesyes (Trace uses Collapsible)yes (r/styles/aria-nova/{trace,code-block}.json)
Blocks (login-01, sidebar, dashboard...)yesyesyes (e.g. r/styles/aria-nova/login-01.json); add picks the project base

Forms (/docs/forms): every guide builds on Field, FieldLabel, FieldDescription, FieldError, FieldGroup with data-invalid on Field and aria-invalid on the control — React Hook Form (Controller + Zod zodResolver), TanStack Form (form.Field render prop + Zod), Formisch (Form + Field, Valibot schema), Next.js (Server Action + useActionState, server-side Zod).

@shadcn/react = unstyled headless primitives (@shadcn/react/questionnaire, @shadcn/react/message-scroller); @shadcn/helpers (/ai-sdk, /tanstack-ai) = scripted useChat conversations for demos/tests, not UI. Typography for rendered markdown: shadcn/typeset (one typeset.css, className="typeset").

AI Elements (Oct 2026, /docs/ai-elements, 21 patterns: Chat, Prompt Input, Reasoning, Tool, Plan, Subagent, Chain of Thought, Sources, Terminal...) = copy-in compositions of shadcn components, NOT a package and NOT a registry component to add by name: read the pattern page (/docs/ai-elements/<base>/<name>, also as .md) and build it from Trace, Code Block, Message, Message Scroller. Replaces AI SDK Elements (to be deprecated; already-installed copies keep working, each pattern page has a migration prompt).


Composition Patterns

Radix: asChild

<Dialog.Trigger asChild>
  <Button variant="outline">Open</Button>
</Dialog.Trigger>

Base UI: render

<Dialog.Trigger render={<Button variant="outline" />}>
  Open
</Dialog.Trigger>

React Aria: trigger wrapper (no asChild, no render)

<DialogTrigger>
  <Button variant="outline">Open</Button>
  <Dialog>
    <DialogHeader>
      <DialogTitle>Title</DialogTitle>
    </DialogHeader>
  </Dialog>
</DialogTrigger>

Reference Guide

Concepts

TopicReferenceWhen to Consult
Radix APIsradix-components.mdBuilding with Radix primitives
Base UI APIsbaseui-components.mdBuilding with Base UI primitives
React Aria APIsTables above + dialog-example.mdBuilding with React Aria primitives

Templates

TemplateWhen to Use
dialog-example.mdCreating Dialog components

Best Practices

DO

  • Detect primitive FIRST (use shadcn-detection)
  • Consult MCP for component source before editing
  • Follow existing naming conventions in project
  • Use correct composition pattern for detected primitive

DON'T

  • Mix asChild, render and React Aria trigger wrappers in same component
  • Assume Radix (or the new Base UI default) without detection
  • Manually write component internals (use MCP)
  • Skip registry check before adding new components

From the fusengine/agents README

Fusengine Claude Code Plugins

version plugins agents skills License: MIT platform Windows

A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment. Expert agents write code, hooks enforce quality in real-time, skills inject framework-specific knowledge, and intelligent cartography auto-maps plugins and projects — so Claude never guesses, never duplicates, and always follows your architecture.

Statusline

Demo: the hook → agent → sniper cycle

Scripted demo — a faithful reconstruction of the real hook → agent → sniper cycle. Regenerate with vhs docs/demo/hook-sniper.tape.

What It Does

Without plugins: Claude Code writes code based on its training data. It can hallucinate APIs, duplicate existing code, ignore your project structure, and produce inconsistent quality.

With Fusengine plugins:

  • Expert agents detect your project type (Next.js, Laravel, React, Astro, Swift...) and load framework-specific documentation via MCP servers before writing a single line
  • 60+ hook checks intercept Write/Edit/Bash and agent/session lifecycle events to enforce file-size limits (<100 lines), block code duplication (DRY), require SOLID reference reads, gate documentation lookup, and block destructive shell commands
  • 240 skills inject copy-paste-ready templates, architecture patterns, and best practices directly into agent context — no hallucination needed
  • APEX workflow structures every task through Analyze → Plan → Execute (TDD) → Review → Validate — preventing the "just write code and hope" approach
  • Sniper agent — a 7-phase post-edit quality check (explore → research → grep usages → lint → fix → zero errors) the APEX workflow invokes after every modification

Quick Install

# Add marketplace
/plugin marketplace add fusengine/agents

# Install all plugins
/plugin install fuse-ai-pilot fuse-commit-pro fuse-laravel fuse-nextjs fuse-react fuse-astro fuse-swift-apple-expert fuse-solid fuse-tailwindcss fuse-design fuse-prompt-engineer fuse-shadcn-ui fuse-security fuse-changelog fuse-lessons fuse-tanstack-start fuse-typescript fuse-php fuse-rust fuse-go fuse-motion fuse-hermes fuse-devops fuse-statusline   # fuse-statusline: responsive status line mod, replaces the classic one (the installer can also set it up)

# Setup (hooks + API keys + MCP servers)
~/.claude/plugins/marketplaces/fusengine-plugins/setup.sh        # macOS / Linux
~\.claude\plugins\marketplaces\fusengine-plugins\setup.ps1       # Windows

Statusline (optional): the fuse-statusline mod is the recommended option — the installer offers it (default yes) and it replaces the classic status line. The classic statusline stays available and is configured with:

bun --cwd ~/.claude/plugins/marketplaces/fusengine-plugins/plugins/core-guards/statusline run config

How It Works

User prompt → Hook detects project type → Expert agent activated
            → Hook loads SOLID references → Agent reads docs via MCP
            → Hook blocks if DRY violation → Agent writes code
            → Hook checks file size → Agent runs Sniper validation
            → Commit gate blocks on lint/type errors → Commit with version bump

Every step is intercepted. Claude cannot skip research, cannot duplicate code, cannot exceed file size limits, and cannot commit with lint or type errors.

Plugins

Development — Framework Expert Agents

Each plugin provides an expert agent that auto-activates when it detects the framework in your project. The agent has access to official documentation via MCP servers and follows SOLID principles enforced by hooks.

PluginDetectsWhat the agent does
fuse-nextjsnext.config.*App Router, RSC, Prisma 7, Better Auth, proxy.ts patterns
fuse-laravelcomposer.json + artisanEloquent, Livewire, Blade, queues, Sanctum, Stripe Connect
fuse-reactpackage.json + ReactReact 19 hooks, TanStack Router/Form, Zustand stores
fuse-astroastro.config.*Islands, Content Layer, Actions, SEO, Starlight, i18n
fuse-swift-apple-expertPackage.swiftSwiftUI, concurrency, Apple Intelligence, system frameworks, Metal, media; all Apple platforms (iOS → visionOS)
fuse-tailwindcsstailwind.config.*v4.1 CSS-first config, @theme, @utility, OKLCH colors
fuse-designAny UI taskGemini Design MCP + shadcn/ui + WCAG 2.2 accessibility
fuse-shadcn-uicomponents.jsonRadix/Base UI detection, registry, theming, migration
fuse-tanstack-start@tanstack/react-startServer functions, selective SSR, middleware, server routes, Nitro deploy
fuse-typescripttsconfig.json (no framework)Pure TS 6.0, Node 24 LTS / Bun 1.3, strict typing, ESM packaging
fuse-phpcomposer.json (no artisan)PHP 8.5, PER-CS 3.0, PHPStan, PSR, Slim / Symfony components
fuse-rustCargo.tomlRust 1.96+, 2024 edition, ownership, tokio / axum, clippy-clean
fuse-gogo.modGo 1.26+, concurrency, backend services, golangci-lint v2

Quality & Security — Automated Enforcement

PluginWhat it enforces
fuse-ai-pilotAPEX workflow orchestration, 7-phase sniper validation, DRY detection via jscpd, 4-level cache (60-75% token savings)
fuse-securityOWASP Top 10 scanning, CVE research via NVD/OSV.dev, dependency audit, secrets detection, auth patterns audit
fuse-solidFiles < 100 lines, interface separation, JSDoc mandatory — auto-detected for TypeScript, PHP, Swift, Go, Java, Ruby, Rust

Productivity — Automation

PluginWhat it automates
fuse-commit-proConventional commits with security check, auto version bump, CHANGELOG, git tag — with a pre-commit secret-pattern scan
fuse-prompt-engineerPrompt creation with CoT/Few-Shot/Meta-Prompting, A/B testing, 50+ template library, agent design
fuse-cartographerIntelligent cartography: auto-generates navigable maps of plugins and projects at SessionStart with merge-preserving enrichment — agents navigate via linked index trees, /map --enrich completes descriptions from source frontmatter
fuse-changelogMonitors Claude Code updates, detects breaking changes in plugins, gathers community feedback via Exa
fuse-lessonsPer-project "never reproduce" memory — writes compact timestamped lessons to MEMORY/LESSON.md after code edits and force-reads them at session/subagent start so mistakes don't recur across sessions
fuse-motionProduct motion films and demos — brief lock, beat map, deterministic HTML scenes rendered to mp4/GIF; owner gates on stills and draft, independent critic review
fuse-hermesNous Research Hermes Agent deployments — from a free-form description of your organisation to a verified chief-of-staff install over SSH: profile, delegation, cron, gateways, security, mail triage, dry run, one go, rollback
fuse-statuslineResponsive statusline mod above the prompt — pill cards on the desktop app, classic segments on the terminal; cache hit/expiry timer, 5h/7d usage, effort — replaces the classic status line

Infrastructure & Operations — Self-Hosted Expert

PluginDetectsWhat the agent does
fuse-devopsInfrastructure repos only: *.tf / *.tofu, ansible.cfg, Chart.yaml, kustomization.yaml, *.pkr.hcl, .sops.yaml (a lone Dockerfile or docker-compose.yml in an application repo does not route here)Docker/Compose, Kubernetes workloads and clusters, Linux, networking, OPNsense, Proxmox VE, KVM/Incus, OpenStack, Terraform/OpenTofu, Ansible, CI/CD, observability, storage and backup, secrets, databases — discovery, dry-run, one go, verify, rollback; no public clouds

Core (auto-installed, always active)

PluginWhat it guards
core-guardsBlocks git push --force, rm -rf, npm install without lock, enforces SOLID file limits, tracks session state, DRY duplication blocking — also bundles token-optimization hooks (MCP verbosity caps, MCP + WebFetch disk cache, SessionStart cleanup)
claude-rulesInjects APEX/SOLID/DRY rules into every prompt so Claude never forgets the methodology

Key Features

FeatureHow it prevents mistakes
APEX WorkflowForces Analyze before coding — no more "let me just write this real quick"
Agent TeamsParallel agents with exclusive file ownership — no merge conflicts
DRY DetectionBlocks Write/Edit if function/class name already exists — forces import or shared extraction
SOLID HooksDenies file save if >100 lines or missing SOLID reference read
Sniper Validation7-phase post-edit check: explore → research → grep → lint → fix → zero errors
4-Level CacheCaches exploration, docs, lessons, tests — 60-75% token savings
Token-efficient by defaultCaps MCP verbosity (Context7/Exa numResults≤3, tokens≤2000), disk cache for MCP results + WebFetch with TTL (48h / 24h) and ripgrep lookup, auto-cleanup at SessionStart — typically saves ~150-200 KB per research-heavy session
23 MCP ServersContext7, Exa, Astro docs, Gemini Design, shadcn, fuse-browser, and more
Smart CommitsSecurity scan before commit, auto version bump, CHANGELOG, shields.io badge sync

Documentation

SectionContent
Getting StartedInstallation, configuration, first steps
WorkflowAPEX methodology, agents, skills, commands
PluginsPer-plugin documentation and skills
ReferenceArchitecture, hooks, MCP servers, cache system

License

MIT

Details

Marketplace
fusengine/agents
Source
plugins/shadcn-expert
Author
Fusengine
Category
Development
License
MIT
Keywords
shadcn-ui, radix-ui, base-ui, components, theming, migration, registries, detection
Listed since
Apr 7, 2026

More from fusengine/agents

All 26

Similar to fuse-shadcn-ui

More Frontend & UI Code