basekit-laravel/basekit-laravel-ui
A Laravel UI toolkit from the BaseKit family, providing reusable Blade components and styling helpers for building consistent interfaces faster. Includes drop-in views, configurable presets, and simple customization for admin panels and app layouts.
Install the package and publish only what you intend to override:
composer require basekit-laravel/basekit-laravel-ui
php artisan vendor:publish --tag=basekit-ui-config
php artisan vendor:publish --tag=basekit-ui-assets # CSS/JS entrypoints
Look here first, in this order:
config/basekit-ui.php — theme tokens, component namespace/prefix, asset paths.resources/views/vendor/basekit-ui/ — the Blade component source you'll be composing with (read it before overriding it).README.md → AGENTS.md (new in v1.11.0) — the package now ships agent/skill definitions for OpenCode, Claude Code, and GitHub Copilot; this is the fastest way to learn the intended composition patterns.First use case: build one page end-to-end — a layout shell plus a form — before touching theming:
<x-basekit::layout title="Dashboard">
<x-slot:header>Dashboard</x-slot:header>
<x-basekit::card>
<x-basekit::form :action="route('projects.store')" method="POST">
<x-basekit::input name="name" label="Project name" />
<x-basekit::button type="submit">Create</x-basekit::button>
</x-basekit::form>
</x-basekit::card>
</x-basekit::layout>
If you use an AI assistant, the v1.11.0 agents/skills are the second thing to wire up (see below) — they encode component names and slot conventions more accurately than most blog posts.
Layout shell + page views. Keep a single x-basekit::layout in resources/views/layouts/app.blade.php and have pages extend it via <x-basekit::layout> or @extends. This keeps the theme swap in one place when you upgrade.
Compose, don't fork. Prefer wrapping package components in your own app-level components (resources/views/components/ui/button.blade.php wrapping x-basekit::button) rather than editing published vendor views. Upgrades then become composer update instead of a three-way merge.
Publish-then-diff workflow. Publish views to a scratch directory, diff against the new vendor version on each upgrade, and copy only the deltas you actually need:
php artisan vendor:publish --tag=basekit-ui-views --force
git diff resources/views/vendor/basekit-ui
Theming via tokens, not class overrides. Set CSS custom properties in resources/css/app.css and map them in config/basekit-ui.php. Reach for class="..." merges only when a token doesn't exist.
Tailwind content configuration. Vendor Blade files must be in your Tailwind content globs or all package classes get purged:
content: [
'./resources/**/*.blade.php',
'./vendor/basekit-laravel/basekit-laravel-ui/resources/views/**/*.blade.php',
],
AI-assisted development (v1.11.0). The package now ships agent and skill definitions with first-class OpenCode, Claude Code, and Copilot support. A workable setup:
AGENTS.md guidance into your repo root so Claude Code and OpenCode pick it up automatically..github/copilot-instructions.md (Copilot does not read AGENTS.md)..opencode/skills/, .claude/skills/) and vendor them under a basekit/ namespace so they don't collide with your own skills.Feature tests around components. Because these are presentation components, assert on rendered markup contract rather than exact classes:
$this->blade('<x-basekit::button variant="danger">Delete</x-basekit::button>')
->assertSee('Delete')
->assertSee('data-variant="danger"', false);
vendor:publish --force is destructive. It overwrites your customizations with no warning. Publish to a scratch tag first, diff, then merge. Consider a CI check that fails if resources/views/vendor/basekit-ui diverges unexpectedly from the installed version.php artisan view:clear after any publish or config change, otherwise you'll debug a component that "isn't updating."config:cache in production. Reading config('basekit-ui.*') inside a service provider's register() captures stale values. Read config in boot() or in the component itself.button component and your app also has x-button, resolution order depends on registration. Use the package prefix (x-basekit::button) explicitly rather than relying on the unprefixed alias.<x-slot:header>). Check the component's $slot/named-slot usage in the vendor source — it's the definitive answer.content glob or haven't rebuilt assets (npm run build) after publishing.How can I help you explore Laravel packages today?