v0.0.2
Demos (demo panel, opens in a new tab)

Installation

A short reference page for installing, updating and deploying Zubazar UI and Zubazar UI Pro.

Path When Section
Free package The components, light and dark mode and the theme switcher are enough Start in 5 minutes
Zubazar UI Pro, new project Starting from scratch with the panel, e-commerce and the themes Starter kit
Zubazar UI Pro, existing project Adding the panel to your own Laravel project Zubazar UI Pro in an existing project

The difference between the two packages: Free and Pro. On macOS and Windows, Laravel Herd installs PHP, Composer and Node.js in one go.

Requirements

Version
PHP 8.2 or later (8.3 for the starter kit and the demos)
Laravel 12 or 13
Livewire 4
Tailwind CSS 4 (no forms plugin needed)
Composer 2.2 or later
Node.js 20.19+ or 22.12+; only when building

PHP needs the extensions Laravel requires (ctype, filter, hash, mbstring, openssl, session, tokenizer) and your database's PDO extension. Every package version: Package versions.

Free package

bash
composer require zubazar/ui
php artisan zubazar:install
npm install && npm run build

The first page and what comes next: Start in 5 minutes. In your own layout, add <zb:layout.head> inside <head>, or write the page with zb:layout.blank.

What zubazar:install does

  • Adds "@zubazar/ui": "file:vendor/zubazar/ui" to package.json: the CSS and JavaScript come from the vendor/ folder and always match the Blade components.
  • Adds @import '@zubazar/ui'; and the components' @source line to resources/css/app.css, and import '@zubazar/ui'; to resources/js/app.js.
  • If Zubazar UI Pro is installed, adds its lines too. In the starter kit, it uses resources/css/zubazar-ui.css and resources/js/zubazar-ui.js.
  • Adds only the missing lines and doesn't create a missing file; running it again changes nothing.
  • When it finds the font line Laravel's new projects ship (--font-sans in @theme), it asks to remove it, because it overrides Zubazar UI's fonts (Public Sans, DM Mono).
  • Doesn't add @tailwindcss/forms; a line left over from older installs is harmless.
Option What it does
--example Copies an example page (resources/views/zubazar/example.blade.php) and shows the route to add
--npm, --no-npm Runs npm install and npm run build without asking, or doesn't run them (pnpm, yarn and bun are recognized from the lock file)
--check Changes nothing and checks the setup: Troubleshooting
--remove-font Removes Laravel's font line without asking
--no-interaction Asks nothing (for CI); the example page, npm and the font only with the options above

To install without the command: Manual installation.

Zubazar UI Pro

Download Zubazar UI Pro as a zip from the My Account › Downloads page:

text
zubazar-ui-pro-v0.0.2/
├── packages/       The zubazar-ui (free) and zubazar-ui-pro packages
├── starter-kit/    A plain Laravel application for a new project: layout, menu, empty dashboard
├── demos/          The demo site's application: every panel and store page
├── LICENSE.md
└── CHANGELOG.md

Composer installs the Zubazar packages from the packages/ folder. The starter kit and the demos run right away inside the zip; their compiled files come ready in the public/build folder. The demos need no database (the sample data is under resources/data; the pdo_sqlite extension is needed).

New project: the starter kit

bash
cd zubazar-ui-pro-v0.0.2/starter-kit
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
php artisan serve

Open http://127.0.0.2:8000; the home page redirects to the panel (/admin). If the SQLite file doesn't exist, migrate offers to create it. For MySQL or PostgreSQL, change the DB_* values in the .env file and run php artisan migrate. The demos open with the same steps (without the migrate step).

The starter kit has the panel layout, the resources/menu/main.json menu, an empty dashboard and two sample pages (Orders, Settings); the interface opens in Turkish, and English is in the language switcher. Sign-in and registration are not installed. To add a page: Page recipes.

When you move the starter kit out of the zip, copy the packages/ folder into the project root too:

bash
composer config repositories.zb path "packages/*"
composer update "zubazar/*"

Warning

php artisan migrate:fresh drops every table and recreates them from scratch. Don't run it against a production database.

Zubazar UI Pro in an existing project

Installs Zubazar UI Pro and its panel in an existing Laravel project. What you need: Requirements, Vite, and laravel-vite-plugin 3.1+ for the fonts (it comes with Laravel 13).

  1. Copy and install the packages. Zubazar UI Pro brings in the free package too:

    bash
    cp -R /downloads/zubazar-ui-pro-v0.0.2/packages ./
    composer config repositories.zb path "packages/*"
    composer require zubazar/ui-pro
    php artisan zubazar:install
    

    zubazar:install adds the package.json, CSS and JavaScript lines: @import '@zubazar/ui';, @import '@zubazar/ui-pro';, the @source line of both packages, import '@zubazar/ui'; and import '@zubazar/ui-pro';.

  2. Set up Vite. vite.config.js:

    js
    import { defineConfig } from 'vite';
    import laravel from 'laravel-vite-plugin';
    import { bunny } from 'laravel-vite-plugin/fonts';
    import tailwindcss from '@tailwindcss/vite';
    import { woff2Only } from '@zubazar/ui/vite';
    
    export default defineConfig({
        plugins: [
            laravel({
                input: ['resources/css/app.css', 'resources/js/app.js'],
                refresh: true,
                fonts: [
                    bunny('Public Sans', { weights: [400, 500, 600, 700], subsets: ['latin', 'latin-ext'], preload: [{ weight: 400 }, { weight: 600 }] }),
                    bunny('DM Mono', { weights: [400, 500], subsets: ['latin', 'latin-ext'], preload: false }),
                ],
            }),
            woff2Only(),
            tailwindcss(),
        ],
    });
    

    Laravel 12 has no fonts option: Laravel 12.

  3. Write the layout. resources/views/layouts/admin/vertical.blade.php:

    blade
    @php
        // Tab title: the Blade page's @section('title') or the Livewire page's #[Title].
        $pageTitle = new \Illuminate\Support\HtmlString(View::yieldContent('title', __($title ?? 'Dashboard')));
    @endphp
    
    <zb:layout.sidebar customizer brand-name="My App" :home-url="route('dashboard')" :title="$pageTitle">
        <zb:slot:head>
            @zubazarFonts(['public-sans', 'dm-mono'])
            @vite(['resources/css/app.css', 'resources/js/app.js'])
        </zb:slot:head>
    
        <zb:slot:nav><zb:menu menu="main" /></zb:slot:nav>
    
        @hasSection('content')
            @yield('content')
        @else
            {{ $slot ?? '' }}
        @endif
    </zb:layout.sidebar>
    

    The last block makes the layout work for both Blade and Livewire pages. For your own logo, add <zb:slot:logo>: Layout files.

  4. Write the menu and the first page. resources/menu/main.json, resources/views/admin/dashboard.blade.php and routes/web.php:

    json
    { "menu": [ { "section": "General" }, { "title": "Dashboard", "icon": "home", "route": "dashboard" } ] }
    
    blade
    @extends('layouts.admin.vertical')
    
    @section('title', __('Dashboard'))
    
    @section('content')
        <zb:page-header :title="__('Dashboard')" />
        <zb:card title="Welcome">Zubazar UI is installed.</zb:card>
    @endsection
    
    php
    Route::view('/panel', 'admin.dashboard')->name('dashboard');
    
  5. Build and open it: npm run build (npm run dev while developing), then /panel.

The chart, map and date range need external libraries: Libraries. For the store: E-commerce.

Updating

  • Free package: composer update zubazar/ui, then npm run build.
  • Zubazar UI Pro: download the new zip, replace the packages/ folder in your project with the new one, then run composer update "zubazar/*" and npm run build.
  • Don't edit the files under vendor/ and packages/; they're overwritten on update. Your own files and the --zb-* variables in your CSS are kept.
  • A component you copied into your application doesn't receive updates; compare your copy with the new version in the package.

What to fix in your own code with each version: Upgrading.

Deploying

The general steps are in Laravel's deployment guide. For Zubazar UI, also note:

  1. The packages/ folder must go to the server; if you deploy with Git, keep it in your (private) repository.
  2. Build order: first composer install --no-dev --optimize-autoloader, then npm ci && npm run build (the build reads vendor/zubazar/). Don't use npm ci --omit=dev: Vite and Tailwind are development dependencies.
  3. Fonts are downloaded from Bunny Fonts during the build; the machine that builds needs internet access, and the live site doesn't connect.
  4. If there's no Node.js, build on your own computer and upload the whole public/build folder (manifest.json and fonts-manifest.json included); there must be no public/hot on the server.
  5. Store themes: after changing the themes, run php artisan zubazar:themes; in CI, php artisan zubazar:themes --check checks that the file is up to date.
  6. The boot file (/zubazar-ui/zubazar-ui-boot.js) is served through PHP; if you have a separate server rule for .js files, let this URL reach index.php.
  7. File uploads: if you save to the public disk, run php artisan storage:link; upload_max_filesize and post_max_size must be larger than the biggest file.
  8. Shared hosting: the packages are linked from the packages/ folder with symbolic links; instead of uploading vendor/, run composer install on the server.

Zubazar UI needs no queue or scheduler. After deploying, the browser console should show no error starting with [Zubazar UI].

Which file to open?

What you want to do File (starter kit)
Add a page to the menu resources/menu/main.json (Menu)
A new panel page resources/views/admin/ and routes/admin.php (Page recipes)
Logo, top bar, page footer resources/views/layouts/admin/sections/
Colors, default appearance resources/css/zubazar-ui.css and config/zubazar-ui.php (Appearance)
Store themes themes in config/zubazar-ui-pro.php, then php artisan zubazar:themes (E-commerce)
Translations, languages lang/*.json, config/zubazar.php and app/Zubazar/ (Language and translation)
Override a component's view resources/views/vendor/zubazar-ui/components/ui/ (Changing a component)

Folder structure

The starter kit is a standard Laravel 13 application; the demos have the same layout, with sample pages.

text
starter-kit/
├── app/Zubazar/                Language selection (Localization, SetLocale, LocaleController)
├── app/Livewire/            Livewire pages and list components
├── config/zubazar-ui.php       Appearance and layout defaults
├── config/zubazar.php          Languages, fallback language, language cookie
├── lang/                    The application's translations (tr.json, en.json)
├── resources/css/zubazar-ui.css   Tailwind, Zubazar UI, Zubazar UI Pro and the @source lines
├── resources/js/zubazar-ui.js     The JavaScript of Zubazar UI and Zubazar UI Pro
├── resources/js/app.js         The application's JavaScript; chart, map, date registrations
├── resources/menu/main.json    The panel's menu
├── resources/views/layouts/admin/   The vertical, horizontal and blank layouts; parts under sections/
├── resources/views/admin/          Panel pages
├── routes/admin.php         Panel routes (/admin)
└── routes/web.php           The home and language selection routes

The packages are installed under vendor/zubazar/ui and vendor/zubazar/ui-pro; to see a component's source, look in the resources/views/components/ui/ folder. Don't change their files.

Troubleshooting

First run php artisan zubazar:install --check: it changes no files, lists every step with ✓ or ✗ and says what to do for each missing one (if something is missing, the exit code is 1). When you ask for support, include its output.

Symptom Fix
Components are unstyled The CSS lacks @source '../../vendor/zubazar/ui/resources/views'; or the build is outdated: php artisan zubazar:install, npm run build
npm install can't find the @zubazar/ui package Run composer install first: the file: line points at the vendor/ folder
A chart, map or date picker is empty The library isn't installed or registered: Libraries
[Zubazar UI] JavaScript is not loaded in the console Add import '@zubazar/ui'; and build, or add @zubazarUiScripts to the layout: Shared JavaScript
[Zubazar UI Pro] JavaScript is not loaded in the console Add import '@zubazar/ui-pro'; and build: PRO JavaScript
"is an Zubazar UI Pro component" error The page has a PRO tag but only the free package is installed; install Zubazar UI Pro or use the free components
The build stops at the laravel-vite-plugin/fonts line Laravel 12 doesn't have this import: Laravel 12
White flash between pages The layout lacks <zb:layout.head>; add it inside <head>
An item doesn't appear in the menu The menu doesn't check permissions; an empty section or group is hidden: Menu problems
List sorting doesn't work zb:sortable-th calls your component's sortBy method; for another name use method (sort-method for zb:table): List page
The unsaved-changes warning doesn't appear Check that the form is wrapped in zb:form dirty-check and that the PRO JavaScript is loaded: Form modal
  • Does it work with Livewire 3? No, it needs Livewire 4.
  • Are sign-in and registration ready? No. Zubazar UI doesn't install an authentication package or routes; it only provides the look of the screens: Sign-in and error pages.
  • License questions: License.

Manual installation

The lines zubazar:install adds for the free package:

  1. package.json (run npm install after composer install):

    json
    "dependencies": {
        "@zubazar/ui": "file:vendor/zubazar/ui"
    }
    
  2. resources/css/app.css (if Laravel's @theme block that sets --font-sans is there, delete it):

    css
    @import 'tailwindcss';
    @import '@zubazar/ui';
    
    @source '../../vendor/zubazar/ui/resources/views';
    
  3. resources/js/app.js:

    js
    import '@zubazar/ui';
    

For Zubazar UI Pro, also add "@zubazar/ui-pro": "file:vendor/zubazar/ui-pro", @import '@zubazar/ui-pro';, @source '../../vendor/zubazar/ui-pro/resources/views/components/ui'; and import '@zubazar/ui-pro';.

Package versions

Package Version Note
laravel/framework ^12.0 or ^13.0 The starter kit and the demos ^13.17
livewire/livewire ^4.0 Also brings Alpine.js; don't install Alpine separately
zubazar/ui 0.0.* The free components, CSS and JavaScript
zubazar/ui-pro the version in the zip Brings in the zubazar/ui package
vite ^8.0.0 When building
laravel-vite-plugin ^3.1 When building; downloads the fonts
tailwindcss, @tailwindcss/vite ^4.1.0 When building
apexcharts, leaflet, flatpickr, datatables.net ^3.54.1, ^1.9.4, ^4.6.13, 3.x Optional; loaded only on the page that uses it
intl PHP extension — Optional; number and money formats (without it the package uses its own separators)

The fonts (Public Sans, DM Mono) are downloaded during the build; the icons (Heroicons) and the flags ship inside the package as SVG. Licenses: Open-source projects in use.

Component tags

The examples in these docs use the short syntax: <zb:button>. The same component can also be called with Blade's own syntax; both produce the same HTML:

blade
<zb:button variant="danger">Delete</zb:button>
<x-zb::button variant="danger">Delete</x-zb::button>
  • Named slots are written as <zb:slot:name> or <zb:slot name="name">.
  • Editor extensions (autocomplete) recognize only the <x-zb::*> syntax.
  • The kit's components live in their own namespace: even if your application has a component with the same name, <zb:button> draws the kit's button.
  • The older <x-ui.*> syntax still works, but it's in Laravel's shared namespace; use <zb:*> in new code.

Learn more

Zubazar UI · ZubazarDesigned for people.