Start in 5 minutes
Install Zubazar UI in a Laravel project, write your first page and learn where to look next.
You need PHP 8.2+, Laravel 12 or 13, Livewire 4, Tailwind CSS 4 and Node.js 20.19+. Details: Requirements.
1. Install
In the root of your Laravel project, run three commands:
composer require zubazar/ui
php artisan zubazar:install
npm install && npm run build
zubazar:install adds Zubazar UI's CSS and JavaScript lines to resources/css/app.css and resources/js/app.js. It only adds missing lines; running it twice changes nothing. To see what it does, line by line: What does zubazar:install do?
2. Your first page
Replace the content of resources/views/welcome.blade.php with:
<zb:layout.blank title="Dashboard" class="bg-page">
<zb:slot:head>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</zb:slot:head>
<main class="mx-auto max-w-3xl space-y-6 p-6">
<zb:alert variant="success" title="Installed">
Zubazar UI components work on this page.
</zb:alert>
<zb:card title="New product" subtitle="Add a product to your store">
<div class="space-y-4">
<zb:input label="Product name" name="name" />
<zb:button>Save</zb:button>
</div>
</zb:card>
</main>
</zb:layout.blank>
Run npm run dev and open the site (php artisan serve or Herd). You see an alert, a card, a field and a button; the page opens in light or dark mode, following your system setting.
zb:layout.blank sets up the page's skeleton: the <head>, light and dark mode and the notification area. If you have your own layout, add only <zb:layout.head /> to its <head>.
3. Add components
Every component has its own page: a live preview, code to copy and a props table. Copy the code into your page and change the text and values. The full list: All components.
Components are written in Blade with the zb: prefix: <zb:button>, <zb:modal>, <zb:table>. They work with Livewire; write wire:model and wire:click straight on the component:
<zb:input wire:model.live="search" label="Search" />
<zb:button wire:click="save">Save</zb:button>
Props and slots
Components take values in two ways:
- Prop: a setting written on the tag. In
<zb:button variant="secondary">,variantis a prop. When the value is PHP, put a colon in front::title="__('Products')". - Slot: content written inside the tag. Everything between the opening and the closing tag is the default slot. A named slot is written as
<zb:slot:footer>…</zb:slot:footer>.
Every component lists its props and slots in the Props table on its page.
With Zubazar UI Pro
Zubazar UI Pro adds the panel layouts, the JSON menu, the form modal, PRO components such as charts and maps, and the e-commerce themes. To start with a ready panel, use the starter kit in the zip; to add it to an existing project, follow the installation steps: Zubazar UI Pro.
Where next?
- Page recipes: a new panel page, a list page and a form modal.
- Appearance: layouts, the menu, colours and light/dark mode.
- Configuration and build: fonts, the build, chart and map libraries, the language choice.
- Language and translation: the language switcher and the package's texts.