Customising
Everything the installer published is application code, so the first answer to "how do I change X" is "edit the file". The config keys below cover the changes you should not need a view edit for.
Brand
// config/ui-kit.php
'brand' => [
'name' => env('UI_KIT_BRAND_NAME', config('app.name')),
'logo' => env('UI_KIT_BRAND_LOGO', '/images/logo.png'),
'home_route' => env('UI_KIT_HOME_ROUTE', 'home'),
],
Drop a logo at public/images/logo.png, or point UI_KIT_BRAND_LOGO anywhere, a full URL included. Until a logo exists the layouts render an initial badge in the accent colour, so a fresh install never looks broken. Brand colours are design-system tokens; see Theme. home_route names the route used for "back to site" links and post-login redirects; when that route does not exist the kit falls back to /.
Auth page copy
Each auth page reads its heading and subheading from config/ui-kit.php under copy: login, register, forgot_password, reset_password, verify_email and confirm_password. Change the words there rather than in the page components.
features.disposable_email_block toggles the disposable-domain check on registration.
Sidebar navigation
// config/admin.php
'nav' => [
['label' => 'Dashboard', 'route' => 'admin.dashboard', 'icon' => 'squares-2x2'],
['label' => 'Users', 'route' => 'admin.users.index', 'icon' => 'users'],
['section' => 'Support'],
['label' => 'Tickets', 'route' => 'admin.support.index', 'icon' => 'ticket', 'badge' => 'open_tickets'],
/* ui-kit:nav-start */
/* ui-kit:nav-end */
],
An entry is either a link, with label, route, icon and an optional badge, or a section divider. icon is the name of a Heroicons v2 outline icon, such as squares-2x2, users, document-text, envelope or chart-bar, rendered through the design system's ds::icon; any icon on heroicons.com works, with no SVG to add. An entry whose icon does not resolve shows a question-mark icon instead of failing the page, and php artisan ui-kit:doctor lists it under nav icons are Heroicons. Keep the two marker comments: modules append their entries between them, idempotently, and never touch the entries outside.
Sidebar badges
A badge key on a nav entry shows a count on the desktop rail and on the phone's bottom bar, where the design system caps the pill at "9+" and reads the full number to a screen reader. The count comes from the bound SidebarBadgeResolver. Since 0.4.1 the kit binds DefaultBadgeResolver, which counts open_tickets (SupportTicket::open()) and unread_contacts (ContactSubmission::unread(): unread and not archived) when those modules are installed, once per request. A count that throws, such as a module's table not yet migrated, is left out instead of failing every admin page, and the doctor says why.
For a badge of your own, bind a resolver that returns every key your nav uses:
$this->app->bind(
\Shipbytes\UiKit\Contracts\SidebarBadgeResolver::class,
\App\Support\AdminBadgeResolver::class,
);
It returns an array keyed by badge name, for example ['open_tickets' => 12, 'unread_contacts' => 3, 'pending_orders' => 4]. Your binding replaces the default entirely; to keep the kit's two counts, extend Shipbytes\UiKit\Support\DefaultBadgeResolver and merge parent::compute() into yours. php artisan ui-kit:doctor fails sidebar badges resolve when a nav entry's key is missing from the output, because a missing badge looks exactly like a count of zero.
Route prefix and middleware
// config/admin.php
'route_prefix' => 'admin',
'route_name_prefix' => 'admin.',
'middleware' => ['auth', 'verified', \Shipbytes\UiKit\Http\Middleware\EnsureIsAdminFallback::class],
Change the prefix to move the whole panel. The middleware list applies to every admin route; the admin-middleware module replaces the fallback with a role check when it installs.
Public and user routes
The pages outside the admin panel are in routes/ui-kit-user.php, which the service provider loads while it carries the ui-kit:managed header. It has two groups:
// Open to guests too (e.g. /contact, /changelog).
Route::middleware(['web'])->group(function () {
/* ui-kit:public-routes-start */
Route::get('changelog', \App\Livewire\Changelog\PublicChangelog::class)->name('changelog.public');
Route::get('contact', \App\Livewire\ContactForm::class)->name('contact');
/* ui-kit:public-routes-end */
});
// Signed-in users only (e.g. /profile, /support).
Route::middleware(['web', 'auth'])->group(function () {
/* ui-kit:user-routes-start */
Route::get('support', \App\Livewire\Support\TicketList::class)->name('support.index');
// …
/* ui-kit:user-routes-end */
});
Modules add their lines between the markers: public_routes in the module registry go to the first group, user_routes to the second. Change a path freely (Route::get('help', …)->name('support.index')), or move a line to routes/web.php; keep the route name, because the shell's links and the mail use it. Re-running the installer finds a route by its name and does not add it twice. A file published before 0.5 has only the second group; see Upgrading.
The support-tickets and contacts modules send mail to "the admins": \Shipbytes\UiKit\Support\UiKit::admins(), which is the users with the Spatie admin role when the User model has hasRole() (the admin-middleware module), and otherwise the users with is_admin. To send that mail to a shared mailbox instead, list addresses:
UI_KIT_ADMIN_ADDRESSES="[email protected],[email protected]"
// config/ui-kit.php
'mail' => [
'admin_addresses' => [...], // non-empty replaces the admin users
],
The mailables are published stubs in app/Mail/ with markdown views in resources/views/mail/support/ and resources/views/mail/contact/: change the subject in the class's envelope() and the words in the view. They use Laravel's stock markdown theme with your APP_NAME in the header. To restyle every mail, php artisan vendor:publish --tag=laravel-mail and edit resources/views/vendor/mail/html/themes/default.css, or add a theme and name it in config/mail.php under markdown.theme.
They implement ShouldQueue on the default queue. Remove implements ShouldQueue from one to send it during the request instead. UiKit::sendMail($recipients, $mailable) sends one message per recipient, logs a failure as ui-kit: could not send <class> and returns it rather than throwing; use it for mail of your own that must not fail a form.
Contact form subjects
The subjects on /contact are a list in config/ui-kit.php; the form validates against it, and the chosen label is what the inbox and the mail show:
'contacts' => [
'subjects' => [
'General question',
'Account or billing',
'Problem report',
'Feature suggestion',
'Something else',
],
],
Theme
The kit has no theme file of its own: its colours, type and spacing are the Shipbytes design system's tokens, which resources/css/ui-kit.css imports (Core shows the file). To change one, redefine its --ds-* variable in app.css after the ui-kit.css import. Set the light value on :root and the dark one on .dark, or the light value applies in both:
@import 'tailwindcss';
@import './ui-kit.css';
:root {
--ds-accent: #0d9488;
--ds-accent-hover: #0f766e;
}
.dark {
--ds-accent: #2dd4bf;
--ds-accent-hover: #5eead4;
}
The token reference lists every variable. In your own views, use the same token classes (bg-surface, text-fg, text-fg-muted, border-border, bg-accent) and ds:: components rather than palette classes, and they follow the theme without a dark: variant.
The font is the design system's Inter, which the kit's layouts load from fonts.bunny.net. To use another font, set --font-sans in an @theme block after the import and load the font yourself; the doctor's app.css does not override the design system font row turns into a skip that reminds you to.
Dark mode is a light or dark class on <html>, and exactly one is always set. Until the user picks a theme, the kit follows the OS preference; <x-theme-toggle /> flips the class and stores the choice in localStorage as ui-kit.theme. The no-flash snippet in <x-ui-kit::head /> applies it before the first paint, and the theme store re-applies it after each wire:navigate page change.
Your own admin screens
An admin screen of your own is a Livewire component rendered in the admin layout, routed in routes/admin.php outside the markers and linked from config/admin.php. Two pieces of the kit make it match the built-in screens.
The page header. <x-ui-kit::page-header> is the title block every admin screen opens with: a title, an optional subtitle, and an actions slot that sits right of the title and wraps under it on a phone.
<div class="space-y-6">
<x-ui-kit::page-header title="Reports" subtitle="Monthly figures for the team.">
<x-slot:actions>
<x-ds::button :href="route('admin.reports.export')">Export CSV</x-ds::button>
</x-slot:actions>
</x-ui-kit::page-header>
{{-- your ds::table, ds::stat-tile, … --}}
</div>
The pagination trait. Use WithDesignSystemPagination in place of Livewire's WithPagination (it includes it):
use Livewire\Component;
use Shipbytes\UiKit\Livewire\Concerns\WithDesignSystemPagination;
class ReportList extends Component
{
use WithDesignSystemPagination;
public function render()
{
return view('livewire.admin.reports.report-list', [
'reports' => Report::query()->latest()->paginate(15),
]);
}
}
{{ $reports->links() }} then renders the design system's pagination, whose buttons call gotoPage, previousPage and nextPage: a page change is a Livewire update that keeps the component's search and filters rather than a full page load. A component that defines paginationView() or paginationSimpleView() itself keeps its own view, because a class method wins over the trait's. The doctor's admin lists paginate with the design system row checks the components under app/Livewire/Admin.
Your own public forms
The contact and new-ticket forms share two guards, which a form of yours can use too: Shipbytes\UiKit\Livewire\Concerns\WithSpamProtection and the <x-ui-kit::honeypot /> field.
use Shipbytes\UiKit\Livewire\Concerns\WithSpamProtection;
class QuoteRequest extends Component
{
use WithSpamProtection;
public function submit(): void
{
if ($this->caughtInHoneypot()) { // a bot filled the hidden field:
$this->sent = true; // fake success, save nothing
return;
}
$this->validate();
// Counted only now, so a typo never uses up an attempt.
if (! $this->passesRateLimit('quote:'.request()->ip(), 3)) {
return; // the refusal is the `limit` error
}
// save, then mail
}
}
<form wire:submit="submit">
@error('limit') <x-ds::alert tone="danger">{{ $message }}</x-ds::alert> @enderror
{{-- … your fields … --}}
<x-ui-kit::honeypot />
</form>
The honeypot is a text field named website, visually hidden, out of the tab order and never autofilled. passesRateLimit($key, $max, $decaySeconds = 3600) allows $max per window.
Rate limiters
The service provider registers login and two-factor limiters only when your app has not already defined them, so define yours in AppServiceProvider::boot() to take over.
Overriding published views
The views, Livewire components, models and migrations in your app are the originals, not overrides. Edit them. If you want the kit's current version of a file back, re-publish its tag with --force:
php artisan vendor:publish --tag=ui-kit-views --force
The tags are ui-kit-config, ui-kit-views, ui-kit-livewire, ui-kit-assets, ui-kit-routes and ui-kit-migrations. Upgrading covers how to do that without losing your changes.