Download the PHP package rajeshwar/unified-ui-laravel without Composer
On this page you can find all versions of the php package rajeshwar/unified-ui-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rajeshwar/unified-ui-laravel
More information about rajeshwar/unified-ui-laravel
Files in rajeshwar/unified-ui-laravel
Package unified-ui-laravel
Short Description A scalable, token-driven Blade component library for Laravel — 75+ components built on Tailwind CSS, Alpine.js & Livewire. Install the Composer package or copy-paste with Artisan CLI.
License MIT
Homepage https://unified-ui.space
Informations about the package unified-ui-laravel
Unified UI for Laravel
A scalable, token-driven Blade component library for Laravel.
75+ components built on Tailwind CSS & Alpine.js.
Install the Composer package or copy-paste with the Artisan CLI.
About
Unified UI for Laravel is the server-side counterpart to the Unified UI React design system. It brings the same token-driven architecture, consistent visual language, and developer experience to the Laravel ecosystem using Blade components and Alpine.js.
Key Features
- Token-driven — Every color, spacing, radius, shadow, and motion value comes from CSS custom properties. Override a few variables, retheme everything.
- Two distribution modes — Install the full Composer package for zero-config convenience, or copy-paste individual components with the Artisan CLI for full source ownership.
- 75+ components — Buttons, Cards, Modals, Tables, Inputs, Badges, Tabs, Accordions, Dropdowns, and more.
- Dark mode native — All tokens and components respect light/dark mode via CSS custom properties with zero config.
- Tailwind CSS v4 — First-class support with native
@themeintegration for seamless token mapping. - Alpine.js powered — Interactive components use Alpine.js for lightweight, declarative client-side behavior with zero build step.
- Accessible — Proper ARIA attributes, keyboard navigation, and focus management baked into every component.
- Laravel 10, 11 & 12 — Supports all actively maintained Laravel versions.
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.1 |
| Laravel | ^10.0 | ^11.0 | ^12.0 |
| Tailwind CSS | v4.x |
| Alpine.js | ^3.0 (optional — required for interactive components) |
Installation
Option A: Composer Package (Recommended)
Install the package — all components are immediately available as <x-ui-*> tags:
The service provider is auto-discovered. Components are registered under the ui prefix and work out of the box:
Option B: Artisan CLI (Copy & Paste)
Like shadcn/ui — components are copied directly into your project. You own the source and can modify anything.
1. Install the package
2. Initialize your project
This creates:
unified-ui.json— configuration file with path aliasesresources/css/unified-ui.css— design token CSS custom properties- Tailwind CSS
@themeintegration instructions
3. Add components
The CLI automatically resolves and installs all dependencies (other components, Composer packages, npm packages).
4. Use in your Blade templates
Artisan Commands
| Command | Description |
|---|---|
php artisan ui:init |
Initialize project — creates config, CSS tokens, Tailwind integration |
php artisan ui:add <name...> |
Add one or more components with automatic dependency resolution |
php artisan ui:add --all |
Add all available components |
php artisan ui:list |
List all available components in a formatted table |
php artisan ui:diff <name> |
Compare local file against the registry version |
Command Options
Configuration
After running php artisan ui:init, a unified-ui.json file is created at your project root:
Configuration Options
| Key | Description | Default |
|---|---|---|
aliases.components |
Where Blade component files are written | resources/views/components/ui |
aliases.css |
Where CSS files are written | resources/css |
aliases.js |
Where JavaScript files are written | resources/js |
registry |
URL to the component registry JSON | GitHub raw URL |
Design Tokens
Unified UI uses CSS custom properties (design tokens) as the single source of truth for all visual values. These are defined in resources/css/unified-ui.css and power every component.
Color Tokens (oklch)
All colors use the oklch color space for perceptual uniformity:
Use them in your own styles:
Token Categories
| Category | Examples |
|---|---|
| Colors | --ui-primary, --ui-secondary, --ui-destructive, --ui-success, --ui-warning, --ui-info, --ui-muted, --ui-background, --ui-foreground, --ui-card, --ui-popover, --ui-border, --ui-ring |
| Spacing | --ui-spacing-0 through --ui-spacing-24 |
| Radius | --ui-radius-sm, --ui-radius-md, --ui-radius-lg, --ui-radius-xl, --ui-radius-2xl, --ui-radius-full |
| Shadows | --ui-shadow-xs, --ui-shadow-sm, --ui-shadow-md, --ui-shadow-lg, --ui-shadow-xl |
| Typography | --ui-font-sans, --ui-font-mono, --ui-font-size-*, --ui-line-height-*, --ui-font-weight-* |
| Motion | --ui-duration-fast, --ui-duration-normal, --ui-duration-slow, --ui-ease-default, --ui-ease-bounce |
| Z-Index | --ui-z-dropdown, --ui-z-modal, --ui-z-popover, --ui-z-toast, --ui-z-tooltip |
Dark Mode
Dark mode works automatically via three methods:
- Class-based — Add the
darkclass to<html>or any ancestor element - Data attribute — Add
data-theme="dark"to<html>or any ancestor - System preference — Automatically detects
prefers-color-scheme: darkunless overridden
Tailwind CSS Integration
The CSS file includes a @theme block that automatically registers all tokens as Tailwind utilities:
Now you can use bg-primary, text-muted-foreground, rounded-lg, etc. directly in your Blade templates.
Components
Component Categories
| Category | Components |
|---|---|
| Form Controls | button, input, textarea, select, checkbox, radio, toggle, switch, slider, label, form, form-group |
| Data Display | card, badge, avatar, table, stat, accordion, collapsible |
| Feedback | alert, spinner, skeleton, progress, empty-state, banner |
| Overlays | modal, dropdown, tooltip, popover, sheet, alert-dialog, command |
| Navigation | tabs, breadcrumb, pagination |
| Layout | stack, container, separator, aspect-ratio, scroll-area |
| Typography | heading, text, kbd, code |
| Alpine | alpine-counter (example integration) |
Component Examples
Button
Card
Input
Badge
Alert
Avatar
Project Structure
Composer Package (installed via composer require)
After php artisan ui:init + php artisan ui:add button card
How It Works
Two Distribution Modes
| Composer Package | Artisan CLI | |
|---|---|---|
| Install | composer require rajeshwar/unified-ui-laravel |
php artisan ui:add button |
| Updates | Composer update | Re-run CLI or ui:diff |
| File location | vendor/ (read-only) |
Your project (editable) |
| Customization | Override via CSS tokens | Edit source directly |
| Best for | Zero-config consistency | Full control & customization |
Component Resolution Priority
When both the Composer package and local files exist, Laravel resolves components in this order:
- Local project —
resources/views/components/ui/button.blade.php - Package stubs —
vendor/rajeshwar/unified-ui-laravel/stubs/button.blade.php
This means you can install the full package via Composer and then selectively override individual components by copying them with php artisan ui:add button.
Registry System
The CLI fetches component definitions from a JSON registry:
- Remote registry — fetched from GitHub and cached for 1 hour
- Local registry — bundled with the package as
registry.json - Fallback — if the remote is unavailable, the local registry is used automatically
Each registry entry defines:
- Component name and description
- File entries with type, path, and remote URL
- Composer and npm dependencies
- Internal component dependencies (auto-resolved)
Safety
- The CLI will never overwrite existing files unless you pass
--overwrite - Use
php artisan ui:diff <name>to review changes before updating - The
--dry-runflag previews what would be installed without writing anything
Alpine.js Integration
Alpine.js components (modals, dropdowns, tabs, counters, etc.) declare alpinejs as an npm dependency. The CLI will:
- Detect whether Alpine.js is in your
package.json - If missing, prompt you to install it
- Auto-detect your package manager (npm, pnpm, yarn, bun)
Customization
Override Design Tokens
Add your overrides after importing the Unified UI CSS:
Edit Copied Components
After running php artisan ui:add button, the source file is yours:
Edit variants, add sizes, change animations — whatever you need. The CLI will warn you if the registry has updates via php artisan ui:diff button.
Comparison
| Feature | Copy-paste only | Unified UI Laravel |
|---|---|---|
| Production-ready components | ✅ | ✅ |
| Accessible (ARIA, keyboard) | ✅ | ✅ |
| Single Composer install | ❌ | ✅ |
| Semantic versioning | ❌ | ✅ |
| Token-driven theming | ❌ | ✅ |
| Dark mode native | ❌ | ✅ |
| Full source ownership | ✅ | ✅ |
| Diff against registry | ❌ | ✅ |
| Dependency auto-resolution | ❌ | ✅ |
| Alpine.js detection | ❌ | ✅ |
| Tailwind v4 support | ❌ | ✅ |
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-component) - Commit your changes (
git commit -m 'Add amazing component') - Push to the branch (
git push origin feature/amazing-component) - Open a Pull Request
Adding a New Component
- Create the Blade stub in
stubs/ - Add the component entry to
registry.json - Test both distribution modes (Composer and CLI)
- Update the README component list
Changelog
Please see CHANGELOG.md for information on recent changes.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Rajeshwar Kashyap
- Inspired by shadcn/ui and the Unified UI React design system
- Built on Laravel, Tailwind CSS, and Alpine.js
License
The MIT License (MIT). Please see LICENSE for more information.
All versions of unified-ui-laravel with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/filesystem Version ^10.0|^11.0|^12.0
illuminate/view Version ^10.0|^11.0|^12.0