Skip to content
Brok UI

Loading…

No results

Introduction

Brok is a copy-into-your-app Blade UI registry for Laravel. Instead of installing a UI library as a black-box package dependency, a single Artisan command writes real, readable Blade and CSS directly into your project — code you own, can edit freely, and can still receive upstream improvements for safely.

It works like shadcn/ui but for Laravel: once the files land in your resources/ directory you own the Blade components and CSS custom-property tokens. Brok's small service provider supplies the concise <brok:*> tag compiler.

New here and weighing it against a runtime component package, an admin-panel builder or a Blade component kit? Why Brok is the honest take on when copy-in is the right call — and when it isn't.

How it works

Four commands, start to finish.

Require the package

Add the CLI and registry client to your project once.
terminal
composer require jml/brok

Run the installer

Detects your Tailwind, Vite, Alpine and Livewire setup and wires up asset entrypoints. Generates ui.json, ui-lock.json, and the CSS/JS entry files.
terminal
php artisan ui:install

Add a component

Fetches the component from the registry and writes it into resources/views/components/ui/. Resolves any sub-dependencies automatically.
terminal
php artisan ui:add button

Edit it — it's your code now

Open the copied Blade file and change whatever you like. Brok never touches the file again unless you explicitly run ui:update. The lock file records your installed version and hash so future updates are diff-aware.

Why copy the code in?

  • Fully editable. The component lives in your repo. Rename a class, swap markup, add Alpine state — no overrides or forks needed.
  • No hosted runtime. Rendering uses only your copied source and the local tag compiler; it never calls the registry.
  • Design-token theming. Every component reads from semantic CSS custom properties (bg-primary, border-input, …). Retheme by editing one CSS file, not every component.
  • Safe opt-in updates. php artisan ui:update --check shows a diff of what changed upstream without overwriting your edits. You decide what to merge.

FAQ

Note

Does rendering call Brok's registry?
No. Components render from the Blade and CSS copied into your repository. The local jml/brok service provider only compiles <brok:*> tags and provides the ui:* tooling.

Note

Can I still receive updates after editing a component?
Yes. Brok stores a compressed pristine copy in committed ui-lock.json and a fast local copy in .jml/cache at install time. Running php artisan ui:update --check diffs the upstream version against that baseline and shows you exactly what changed, without touching your edited files.

Next steps