Skip to content
TallCraftUI

Installation

Add TallCraftUI to a Laravel app in two commands. The installer publishes the stylesheet and wires it into app.css, so there's no Tailwind config to edit.

1 Requirements

2 Install the package

Require TallCraftUI with Composer:

Terminal
composer require developermithu/tallcraftui

3.0 is in beta. Until the stable release, require it with the beta flag:

Terminal
composer require developermithu/tallcraftui:^3.0@beta

3 Run the installer

Terminal
php artisan install:tallcraftui

The installer:

  • publishes resources/css/tallcraftui.css, which registers the component source path for Tailwind and sets default brand colors,
  • adds any missing lines to resources/css/app.css, right after your existing @import rules,
  • offers to install @tailwindcss/forms with the package manager it finds from your lockfile,
  • switches to a tc- component prefix if your app already has components with the same names.

It only adds what's missing, so it's safe to run again. Afterwards, app.css contains:

resources/css/app.css
@import 'tailwindcss';
@import './tallcraftui.css';
@plugin '@tailwindcss/forms';
@custom-variant dark (&:where(.dark, .dark *));

The @custom-variant line enables class-based dark mode, which the theme toggle uses. Leave it out if dark mode should follow the operating system only.

4 Set your brand colors

Components use two theme colors, primary and secondary. They default to #6d28d9 and #a21caf. Define your own in app.css to override them:

resources/css/app.css
@theme {
--color-primary: #0e7c72;
--color-secondary: #5b61e8;
}

Then start Vite:

Terminal
npm run dev # or: bun dev

5 Use your first component

Components work in any Blade view. Inside a Livewire component, bind them with wire:model like any input. Validation errors for the bound property appear under the field automatically. Try submitting this form empty:

Blade
@php
// public string $email = '';
// public function save() { $this->validate(['email' => 'required|email']); }
@endphp
 
<form wire:submit="save" class="flex max-w-sm flex-col gap-4" novalidate>
<x-input label="Email" type="email" wire:model="email" placeholder="you@example.com" />
<x-button label="Subscribe" spinner="save" class="w-fit" />
</form>

Existing projects

Breeze and Jetstream ship their own <x-input>, <x-button> and similar components. When the installer finds components with the same names, it publishes config/tallcraftui.php with a tc- prefix to avoid conflicts. Use the components like this:

Blade
<x-tc-input label="Name" wire:model="name" />
<x-tc-button label="Save" />

You can change the prefix any time. See component prefix.

Next steps