/symfony-ux-skills:ux-toolkitfrom symfony-ux-skills
Installs editable Twig UI components (buttons, dialogs, forms) from Shadcn UI, Flowbite or Bootstrap kits into Symfony projects. Run ux:install to copy recipes into your project for full control.
Ships in symfony-ux-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Install UI components the way Shadcn UI does: ux:install copies a recipe's Twig components and Stimulus controllers into your project, and from then on the code is yours to edit. Nothing stays in vendor/: the code, and its updates, are yours.
Since Symfony UX 3.7+, the Toolkit follows the Symfony BC promise for the ux:install arguments and options, the ux_toolkit configuration and the manifest format. Recipe content itself can change between versions.
composer require --dev symfony/ux-toolkit
The package only registers console commands: rendering never needs it, only installing recipes does. The installed components rely on TwigComponent and, for the interactive ones, on StimulusBundle.
php bin/console ux:install Pick a kit, then a recipe, interactively
php bin/console ux:install button --kit=shadcn Install one recipe from one kit
php bin/console ux:install dialog -k shadcn -f Overwrite changed files without asking
--kit=github.com/acme/ui-kit:v1.2 A community kit from a GitHub repository root
Kit (--kit) | Styling | Recipes |
|---|---|---|
shadcn | Tailwind CSS 4, Shadcn UI "Nova" | 64 components, 26 blocks (login, signup, sidebar) |
flowbite-4 | Tailwind CSS 4, Flowbite v4 | 22 components |
bootstrap | Bootstrap 5.3 | 25 components |
common | Unstyled helpers | 7 components (clipboard, post-link, logout-link...) |
Full recipe lists and the CSS setup of each kit: references/kits.md.
php bin/console ux:install dialog --kit=shadcn
dialog also installs button): Twig files to templates/components/, controllers to assets/controllers/.git diff when git is available; --force overwrites.composer require ... and importmap:require ... (or npm install ...) yourself. It always lists the kit's global packages, even when they are already installed.Run it from the project root: files go to --destination, which defaults to the current directory. In a non-interactive shell, pass both the recipe and --kit, and add --force to replace changed files (they are skipped otherwise).
Each kit needs its CSS foundation before the first recipe looks right. For Shadcn UI with AssetMapper and the TailwindBundle:
php bin/console importmap:require shadcn/dist/tailwind.css tw-animate-css/dist/tw-animate.css
composer require twig/extra-bundle twig/html-extra tales-from-a-dev/twig-tailwind-extra symfony/ux-icons
/* assets/styles/app.css */
@import 'tailwindcss';
@import '../vendor/tw-animate-css/dist/tw-animate.css';
@import '../vendor/shadcn/dist/tailwind.css';
@custom-variant dark (&:is(.dark *));
/* + the @theme inline mapping, the :root and .dark color variables,
and the @layer base rules from the kit's INSTALL.md */
Copy the theme block from kits/shadcn/INSTALL.md or the Shadcn UI kit page. The block defines the tokens used by the recipes, including --background, --primary and --radius. For the other kits, see the Flowbite and Bootstrap setup.
Recipes are anonymous TwigComponents with props declared in {% props %} and variants built with html_cva:
<twig:Button>Save</twig:Button>
<twig:Button variant="outline" size="sm">Cancel</twig:Button>
<twig:Button as="a" href="{{ path('app_home') }}" variant="link">Home</twig:Button>
<twig:Button variant="ghost" size="icon" aria-label="Delete">
<twig:ux:icon name="lucide:trash-2" />
</twig:Button>
Classes you pass merge with the variant classes through tailwind_classes, and yours win on conflict (class="rounded-full" replaces the default radius).
Compound components share state with provide() / inject(). Triggers expose an attribute set to spread on your own element:
<twig:Dialog id="delete_account">
<twig:Dialog:Trigger>
<twig:Button variant="destructive" {{ ...dialog_trigger_attrs }}>Delete account</twig:Button>
</twig:Dialog:Trigger>
<twig:Dialog:Content>
<twig:Dialog:Header>
<twig:Dialog:Title>Are you absolutely sure?</twig:Dialog:Title>
<twig:Dialog:Description>This cannot be undone.</twig:Dialog:Description>
</twig:Dialog:Header>
<twig:Dialog:Footer>
<twig:Dialog:Close>
<twig:Button variant="outline" {{ ...dialog_close_attrs }}>Cancel</twig:Button>
</twig:Dialog:Close>
</twig:Dialog:Footer>
</twig:Dialog:Content>
</twig:Dialog>
The same pattern gives alert_dialog_trigger_attrs, tooltip_trigger_attrs and modal_trigger_attrs (Flowbite). Each recipe's README, and its page on ux.symfony.com, lists the props and examples.
Since Symfony UX 3.7+, choose where files go, and optionally namespace them:
# config/packages/ux_toolkit.yaml
when@dev:
ux_toolkit:
components:
dir: 'templates/components' # TwigComponent anonymous template directory
subdirectory: 'ui' # components become <twig:ui:Button>
controllers:
dir: 'assets/controllers' # must match your Stimulus controller path
subdirectory: 'ui' # identifiers become ui--dialog
The installer rewrites component names and Stimulus identifiers in the copied files to match. Both dir values must match your Twig, TwigComponent and Stimulus configuration, so that the installed files get loaded. Keep the file under when@dev when the bundle is only enabled in dev.
A kit is a folder (or a GitHub repository root) with a manifest.json and one folder per recipe. Install from GitHub with --kit=github.com/acme/ui-kit (:ref for a tag or branch; main by default; needs symfony/http-client and ext-zip).
vendor/bin/ux-toolkit-kit-create # scaffold manifest.json and a Button recipe
vendor/bin/ux-toolkit-kit-lint # validate the kit (--fail-on-warning for CI)
vendor/bin/ux-toolkit-kit-debug # list each recipe's files and dependencies
Manifest keys, placeholders and naming rules: references/kits.md.
login-01, logout-link); the manifest name ("LoginForm") is only a label.ux:install is the only upgrade path: read the diff for each changed file, since your edits live in the same files.lucide: icons through UX Icons: install symfony/ux-icons and lock icons before deploying (see ux-icons).@hotwired/stimulus: although no recipe lists it, StimulusBundle must be set up.cursor: default: add button:not(:disabled) { cursor: pointer; } to your base layer if you want the pointer.symfony/ux-toolkit on Packagist.attributes, html_cva, provide() / inject() behind every recipeWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub smnandre/symfony-ux-skills --plugin symfony-ux-skills20 skills in this plugin
/live-componentSymfony UX LiveComponent: live search, live filters, dependent selects and form validation as users type. Use for reactive PHP and Twig components, #[AsLiveComponent], LiveProp, LiveAction, data-model, loading states, emit/listen, lazy rendering and LiveResponse downloads./stimulusSymfony UX Stimulus: JavaScript behavior for dropdowns, tabs, modals, clipboard buttons and third-party widgets. Use for StimulusBundle, data-controller, data-action, targets, values, outlets, lazy controllers and Twig stimulus_* helpers./symfony-uxSymfony UX: choose and combine packages for a Symfony frontend. Use when deciding between Stimulus, Turbo, TwigComponent and LiveComponent, or fitting several Symfony UX packages into the same feature. Prefer the dedicated skill for a task that fits one package./turboSymfony UX Turbo: Turbo Frames for partial navigation and form submissions, Turbo Streams for multiple updates and Mercure broadcasts, and Turbo Drive for links and forms. Use for turbo-frame, turbo-stream, twig:Turbo, TurboFrame, TurboStreamResponse, turbo_stream_from and #[Broadcast]./twig-componentSymfony UX TwigComponent: reusable Twig buttons, cards, alerts and design system components. Use for twig: tags, #[AsTwigComponent], props, blocks, attributes.defaults(), anonymous components, computed properties, provide()/inject() and html_cva./ux-autocompleteSymfony UX Autocomplete: searchable selects and Ajax suggestions for large Symfony form lists. Use for EntityType, ChoiceType, Tom Select, the autocomplete option, #[AsEntityAutocompleteField], #[AsAutocompleteField], AutocompleterInterface, extra_options and tom_select_options.Other plugins' skills for the same job