Installation

Install with Composer, wire with ui:install, build. Three steps and every component plus 37 themes × 11 tunes are ready to use.

Requirements

  • PHP 8.2+
  • Laravel 11 / 12 / 13
  • Tailwind CSS v4 (the default Vite setup on Laravel 11+)
  • Node.js (for the Vite build)

1. Add the package

bash
composer require sparrowhawk-labs/pinion-ui

The icon package (pinion-icons) is pulled in automatically as a dependency — no separate install needed.

2. Wire it up with ui:install

bash
php artisan ui:install --ai

This command does all the wiring:

  • Adds npm dependencies — daisyui ^5 / alpinejs ^3 / @alpinejs/focus / @alpinejs/collapse
  • Adds a single @import of the pinion-ui preset to resources/css/app.css (loads themes, tunes, and @source globs in one line)
  • Wires Alpine and its plugins into resources/js/app.js
  • Patches your layout's <html> with a data-theme attribute
  • With --ai, appends a reference to AGENTS.md into your project's CLAUDE.md so AI agents can read the correct usage rules

3. Build

bash
npm install && npm run build

That's it. Components like <x-button> are ready to use in your Blade templates.

Pick a theme and a tune

The look is controlled by two attributes on <html>: data-theme sets the color palette (37 palettes × light/dark) and data-tune sets shape, spacing, and typography (11 presets). The two axes are orthogonal — mix them freely.

html
<html data-theme="pinion" data-tune="default">

Try combinations live with the Theme / Tune switcher in the top-right navbar — it applies to this page too.

Your first component

<x-button color="primary" icon="rocket">Hello Pinion</x-button>
<button class="inline-flex items-center justify-center whitespace-nowrap font-medium tracking-wide transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 rounded-[var(--radius-field)] border-[length:var(--border)] h-[var(--h-field-md)] px-[var(--px-field-md)] text-[length:var(--text-field-md)] gap-2 bg-primary text-primary-content border-primary hover:bg-primary/90 focus-visible:ring-primary cursor-pointer"><svg class="w-4 h-4" viewbox="0 0 24 24">
<path fill="currentColor" fill-rule="evenodd" d="m14.447 16.377l5.847-5.83c.842-.839 1.263-1.259 1.484-1.792S22 7.627 22 6.44v-.567c0-1.826 0-2.739-.569-3.306S19.947 2 18.116 2h-.57c-1.19 0-1.785 0-2.32.221c-.536.221-.957.641-1.8 1.48L7.58 9.531c-.984.98-1.594 1.589-1.83 2.176a1.5 1.5 0 0 0-.112.562c0 .802.647 1.448 1.942 2.739l.174.173l2.038-2.069a.75.75 0 1 1 1.069 1.053L8.816 16.24l.137.137c1.295 1.29 1.943 1.936 2.747 1.936c.178 0 .348-.031.519-.094c.603-.222 1.219-.836 2.228-1.842m2.747-6.846a1.946 1.946 0 0 1-2.747 0a1.93 1.93 0 0 1 0-2.738a1.946 1.946 0 0 1 2.747 0a1.93 1.93 0 0 1 0 2.738" clip-rule="evenodd"></path>
<path fill="currentColor" d="M9.034 5.963L6.491 8.5c-.467.466-.896.893-1.235 1.28a6 6 0 0 0-.619.82l-.024-.025l-.095-.094a4.9 4.9 0 0 0-1.532-1.004l-.123-.05l-.379-.15a.764.764 0 0 1-.259-1.252C3.345 6.907 4.69 5.566 5.34 5.297a3.4 3.4 0 0 1 1.788-.229c.546.081 1.063.362 1.907.895m4.342 13.35c.205.208.34.355.464.512q.243.311.434.658c.142.26.253.537.474 1.092a.69.69 0 0 0 1.126.224l.084-.083c1.12-1.117 2.465-2.458 2.735-3.105a3.35 3.35 0 0 0 .229-1.782c-.081-.545-.362-1.06-.897-1.902l-2.552 2.544c-.478.477-.916.914-1.313 1.256c-.237.206-.497.41-.784.586" opacity=".3"></path></svg> Hello Pinion</button>

A single button is enough to verify the setup. The component catalog links to every component's usage page. Component Catalog →

Using it with AI agents

pinion-ui is designed for AI-assisted coding. The AGENTS.md wired by ui:install --ai documents calling conventions, gotchas, and the class-vocabulary rules, so agents like Claude Code write correct code from the start. It also installs a Claude Code hook that runs ui:lint automatically after Blade edits (skip with --skip-hooks).