Blade components for PHP / OneDesk
The BMS design as Blade components for PHP/Laravel apps (OneDesk/FreeScout, any Laravel 11/12 app):
the same look as the React @bmsuisse/ui, as plain CSS + a little vanilla JS.
No build step, no Tailwind, no jQuery dependency, and it coexists with Bootstrap 3. Colours are CSS
variables (--bmsui-*); a .dm class on <body> switches to night mode (FreeScout/BMS Design already sets it).
| Component | Usage |
|---|---|
| Chip | <x-bmsui::chip tone="success" href="/x" removable>Text</x-bmsui::chip> (neutral, info, success, warning, danger) |
| Banner | <x-bmsui::banner tone="warning" title="Title" dismissible>Text</x-bmsui::banner> |
| Stat strip | <x-bmsui::stat-strip><x-bmsui::stat label="Open" value="128" sub="+12" trend="down"/></x-bmsui::stat-strip> |
| Timeline | <x-bmsui::timeline><x-bmsui::timeline-item title="Assigned" time="14.11.2026 09:12" tone="accent">Body</x-bmsui::timeline-item></x-bmsui::timeline> |
| Copy button | <x-bmsui::copy-button value="OFF-1" label="Copy"/> (no label = icon only, set aria-label) |
| Confirm popover | <x-bmsui::confirm action="{{ route('x.destroy', $x) }}" method="DELETE" message="Really delete?">Delete</x-bmsui::confirm>; without action it fires a bmsui:confirm event |
| AI button | <x-bmsui::ai-button variant="subtle" :loading="$busy">Draft reply</x-bmsui::ai-button> (solid, subtle, ghost; theme accent with a soft glow) |
| Brand logo | <x-bmsui::brand product="Desk" :size="32" :animate="true"/> (mode: full, one, mark) |
| Email address input | <x-bmsui::email-address-input name="to" :value="$to" :max-items="10" :suggestions="[['email' => 'a@b.ch', 'name' => 'Anna']]"><x-slot:label>To</x-slot:label></x-bmsui::email-address-input>; chips with a hidden field name (comma-joined), Enter/,/;/space/Tab/blur/paste commit, invalid addresses become red chips, Backspace removes the last; fires bmsui:change |
| Split button | <x-bmsui::split-button :items="[['id' => 'close', 'label' => 'Send & close'], ['id' => 'x', 'label' => 'Link', 'href' => '/x']]" variant="default" type="submit" name="act" value="send">Send</x-bmsui::split-button>; item buttons fire bmsui:select (detail.id); variant: default, outline, secondary; top, end, loading |
| Conversation list / row | <x-bmsui::conversation-list><x-bmsui::conversation-row subject="Offerte" preview="..." href="/c/1" :customer="['name' => 'Keller AG']" :assignee="['name' => 'Anna']" status="active" :unread="true" :starred="true" :thread-count="3" :has-attachments="true" time="09:12" :selected="false"><x-bmsui::chip>Tag</x-bmsui::chip></x-bmsui::conversation-row></x-bmsui::conversation-list> (status: active, pending, closed, spam; omit selected for no checkbox; the tags slot stays clickable) |
| Attachment list | <x-bmsui::attachment-list :attachments="[['id' => 1, 'name' => 'Offerte.pdf', 'size' => 1258291, 'mimeType' => 'application/pdf', 'href' => '/d/1']]" layout="chips" :removable="true"/> (BMSUi::formatFileSize() is available too) |
| Quoted text | <x-bmsui::quoted-text :open="false">On 14.11.2026, X wrote: ...</x-bmsui::quoted-text> |
| Mail message | <x-bmsui::mail-message direction="inbound" :sender="['name' => 'Anna', 'email' => 'a@b.ch']" :recipients="['to' => [...], 'cc' => [...]]" time="14.11.2026 09:12" subject="..." status="failed" error="SMTP" retry-href="/r" :attachments="$files">{!! $sanitizedBody !!}<x-slot:quoted>...</x-slot:quoted><x-slot:actions>...</x-slot:actions><x-slot:badges>...</x-slot:badges></x-bmsui::mail-message> (direction: inbound, outbound, note; status: sent, sending, failed, bounced, draft; the body slot is not sanitized, pass trusted HTML only) |
| Mail event | <x-bmsui::mail-event tone="success" time="14.11.2026 17:20">Status changed to Closed</x-bmsui::mail-event> |
| Button | <x-bmsui::button variant="primary" size="md" type="submit" :loading="$busy">Save<x-slot:start><svg .../></x-slot:start></x-bmsui::button> (variant: primary, secondary, outline, ghost, link, danger; size: xs, sm, md, lg; :icon="true" square icon-only button (set aria-label); href renders an <a>, disabled links lose their href) |
| Form field, label, input, textarea | <x-bmsui::form-field label="Subject" for="subject" help="Shown in the list" :error="$errors->first('subject')" :required="true"><x-bmsui::input name="subject" :value="old('subject')"/></x-bmsui::form-field>; the control takes the field's for as its id and gets aria-describedby/aria-invalid; layout="horizontal" puts the label in a column on wide screens; <x-bmsui::textarea :auto-resize="true" :max-rows="8">; <x-bmsui::label for="x" :required="true"> on its own |
| Select | <x-bmsui::select name="mailbox" :value="$id" placeholder="Choose" :options="['1' => 'Sales', 'Archive' => ['9' => 'Old']]"/> (native <select>; nested arrays become <optgroup>, multiple works, extra <option>s in the slot) |
| Checkbox, switch, radio group | <x-bmsui::checkbox name="notify" label="Notify" description="By mail" :checked="true" :indeterminate="false"/>, <x-bmsui::switch name="auto" label="Auto reply"/> (role="switch"), <x-bmsui::radio-group name="prio" label="Priority" value="normal" orientation="horizontal" :options="['low' => 'Low', 'normal' => 'Normal']"/>; all native inputs, same name/value as before |
| Combobox, tag combobox | <x-bmsui::combobox name="customer_id" :value="$id" :selected="[['value' => $id, 'label' => $name]]" search-url="/customers/ajax-search" :min-chars="2" placeholder="Search"/> (replaces select2: a hidden field name; :options are filtered in the browser, search-url asks the server with q (or {q} in the URL) and reads [{value, label, description}] or select2's {results: [{id, text}]}); <x-bmsui::tag-combobox name="tags" :value="$tags" search-url="/tags/search"/> posts tags[], chips, Enter on free text adds a tag (:creatable="false" to forbid), Backspace removes the last; :multiple="true" on the combobox does the same without free text; listbox keyboard, aria-activedescendant, fires bmsui:change |
| Dialog, modal, confirm dialog | <x-bmsui::dialog id="move" title="Move" description="..." size="md" url="/conversations/5/move">Loading…<x-slot:footer>...</x-slot:footer></x-bmsui::dialog> + <button data-bmsui-dialog-open="#move">; native <dialog> with showModal() (page inert, focus inside, back to the opener on close), Escape and backdrop close (:static="true" keeps it open on backdrop clicks), url loads the body by ajax on every open, data-bmsui-dialog-close buttons close it with their value as returnValue; size: sm, md, lg, xl; <x-bmsui::modal> is the same; any link with data-bmsui-dialog-url="/x" data-bmsui-dialog-title="X" opens a shared ajax dialog (render <x-bmsui::dialog id="bmsui-remote"/> once for translated labels); JS: BMSUi.dialog.open('move'), .close('move', 'value'), .load('move', url); events bmsui:open, bmsui:close (detail.returnValue), bmsui:loaded. <x-bmsui::confirm-dialog id="del" title="Delete?" message="..." action="/x/5" method="DELETE"/> (without action: bmsui:confirm); await BMSUi.confirm('Really?', {title, confirmLabel, cancelLabel}) resolves true/false (uses <x-bmsui::confirm-dialog id="bmsui-confirm"/> when the layout renders it) |
| Tabs | <x-bmsui::tabs label="Settings" active="general" :tabs="[['id' => 'general', 'label' => 'General'], ['id' => 'mail', 'label' => 'Mailboxes', 'count' => 4]]"><x-bmsui::tab-panel id="general">...</x-bmsui::tab-panel><x-bmsui::tab-panel id="mail">...</x-bmsui::tab-panel></x-bmsui::tabs> (arrow keys, Home/End, bmsui:tab); with href on the tabs they are links to server pages (aria-current) |
| Tooltip, popover | <x-bmsui::tooltip text="Assign" side="bottom"><button>…</button></x-bmsui::tooltip>, or data-bmsui-tooltip="Assign" on any element (hover and focus, flips at the edge, Escape hides); <x-bmsui::popover title="Customer" align="end" :width="280"><x-slot:trigger>Info</x-slot:trigger>Content</x-bmsui::popover> (click, outside click/Escape close) |
| Alert box | <x-bmsui::alert-box tone="error" title="Not saved" :dismissible="true">Fix the marked fields.</x-bmsui::alert-box> (inline banner for flash messages/form errors; error, warning, info, success) |
| Badge, status badge, status dot | <x-bmsui::badge variant="secondary">12</x-bmsui::badge> (default, secondary, outline, danger, warning, success, info); <x-bmsui::status-badge status="in_review" :tone-map="['waiting' => 'info']" :dot="true"/> (built-in vocabulary active/approved/pending/draft/rejected/failed/new/… translated, unknown statuses title-cased); <x-bmsui::status-dot tone="success" :pulse="true">Online</x-bmsui::status-dot> |
| Empty state | <x-bmsui::empty-state title="No conversations" description="..." size="sm"><x-slot:action>...</x-slot:action></x-bmsui::empty-state> (icon slot replaces the default tray) |
| Skeleton, loading spinner | <x-bmsui::skeleton :lines="3"/>, <x-bmsui::skeleton :circle="true"/>, <x-bmsui::skeleton :width="120" height="1rem"/>; <x-bmsui::loading-spinner size="sm" label="Loading…"/> (role="status") |
| Kbd, key combo | <x-bmsui::kbd>K</x-bmsui::kbd>, <x-bmsui::key-combo keys="mod+k"/> (mod shows Ctrl, ⌘ on Apple), chords keys="g i" |
| Card, metadata list | <x-bmsui::card title="Keller AG" description="Customer since 2019" href="/c/1">...<x-slot:actions>...</x-slot:actions><x-slot:footer>...</x-slot:footer></x-bmsui::card>; <x-bmsui::metadata-list :columns="2" :items="[['label' => 'Customer no.', 'value' => '10412', 'copy' => true], ['label' => 'Phone', 'value' => null]]"/> (empty = "—", layout="vertical") |
| Timestamp | <x-bmsui::timestamp :value="$thread->created_at"/> ("vor 5 Minuten" via Carbon in the app locale, kept current in the browser, full date as tooltip); format: relative, date, datetime, time |
| Pagination | <x-bmsui::pagination :page="$page" :pages="$last" url="?page={page}"/> (links); without url the pages are buttons firing bmsui:page (detail.page) for ajax; constant width with ellipses, "3 of 13" on phones |
| Table, table shell, toolbar | <x-bmsui::table-shell><x-slot:toolbar><x-bmsui::table-toolbar :count="24"><x-bmsui::search-bar/><x-slot:actions>...</x-slot:actions></x-bmsui::table-toolbar></x-slot:toolbar><x-bmsui::table :striped="true" :dense="true" caption="Users"><thead>...</thead><tbody>...</tbody></x-bmsui::table><x-slot:footer>...</x-slot:footer></x-bmsui::table-shell> (your own <thead>/<tbody>; class="is-num" right-aligns; scrolls sideways inside its box on phones) |
| Page header, breadcrumbs | <x-bmsui::page-header title="Offerte" description="#10412" back-href="/inbox" :breadcrumbs="[['label' => 'Inbox', 'href' => '/i'], ['label' => 'Offerte']]" :divider="true"><x-slot:badge>...</x-slot:badge><x-slot:after-title>...</x-slot:after-title><x-slot:actions>...</x-slot:actions><x-slot:tabs>...</x-slot:tabs></x-bmsui::page-header>; <x-bmsui::breadcrumbs :items="[...]" :max-items="4"/> (middle items fold into a "…" menu) |
| Search bar | <x-bmsui::search-bar action="/search" name="q" :value="request('q')" :loading="false"><x-slot:actions>...</x-slot:actions></x-bmsui::search-bar> (GET form with action, otherwise just the field; clear button fires bmsui:clear) |
| Sidebar, nav group, nav item | <x-bmsui::sidebar><x-slot:header>...</x-slot:header><x-slot:mark>...</x-slot:mark><x-bmsui::nav-group id="mailboxes" label="Mailboxes"><x-bmsui::nav-item label="Sales" href="/m/1" :active="true" :count="12"><x-slot:icon><svg .../></x-slot:icon></x-bmsui::nav-item></x-bmsui::nav-group></x-bmsui::sidebar>; rendered fully on the server, the collapsed rail and closed groups come from cookies (bmsui_sidebar, bmsui_nav_groups; add them to EncryptCookies::$except), no flash; tooltips in the rail; below 768px an off-canvas drawer opened by data-bmsui-sidebar-open; items outside a group go in <ul class="bmsui-navlist"> |
| KPI card, sparkline | <x-bmsui::kpi-card label="Open" value="128" delta="+12" trend="up" :up-is-good="false" sub="since yesterday" :spark="[96, 104, 128]" spark-label="Last 7 days"/>; <x-bmsui::sparkline :values="[...]" tone="success" :width="96" :height="28"/> (server-side SVG) |
| Toast | <x-bmsui::toaster :toasts="session('toasts', [])" position="bottom-right"/> once in the layout (initial toasts, e.g. flash messages); JS BMSUi.toast.success('Saved', {description, action: {label: 'Undo', onClick}, id, duration}), .error/.warning/.info, BMSUi.toast.dismiss(id); max 3, a toast with the id of a visible one replaces it, errors stay 8 s, others 4 s, Infinity = sticky, hover/focus pauses |
| Command palette | <x-bmsui::command-palette :commands="[['id' => 'new', 'label' => 'New conversation', 'group' => 'Actions', 'href' => '/new', 'keywords' => 'create', 'shortcut' => 'mod+n']]" hotkey="mod+k"/>; commands come from the server, the browser filters/ranks them (label start, word start, contains, keywords), arrow keys + Enter; items without href fire bmsui:command (detail.id); open with the hotkey, data-bmsui-command-open or BMSUi.commands.open(); :hotkey="false" = no shortcut |
| Date input, date-time input | <x-bmsui::date-input name="due" :value="$due" min="2026-01-01"/>, <x-bmsui::date-time-input name="snooze_until" :value="$until"/> (native date/datetime-local fields: the browser's picker and date format, the value posts as ISO; type="time" too; works inside a form field) |
| Dropdown menu | <x-bmsui::dropdown-menu label="Actions" align="end" :items="[['id' => 'fwd', 'label' => 'Forward', 'shortcut' => 'F'], ['separator' => true], ['heading' => 'Move'], ['label' => 'Move to', 'items' => [['id' => 'inbox', 'label' => 'Inbox']]], ['id' => 'del', 'label' => 'Delete', 'danger' => true]]"/>; buttons fire bmsui:select (detail.id), links navigate; arrow keys, Home/End, type-ahead, submenus (ArrowRight/Left), Escape; trigger slot for own trigger content, variant for the trigger look |
All texts are props (defaults go through __(), and de/fr/it/nl/es translations ship in resources/lang/*.json, loaded automatically with the app locale; FreeScout modules register BMSUi::langPath()), all content is escaped. Behaviour is delegated
(resources/js/bmsui.js), so HTML added later (ajax) just works.
The few behaviours that need a setup step (indeterminate checkboxes, auto-resizing textareas, tab panel ids,
⌘ on Apple key caps, dialogs rendered open) run for inserted nodes via a MutationObserver;
window.BMSUi.init(container) does the same by hand.

OneDesk / FreeScout extension points
The list and the thread view can replace FreeScout's markup without breaking its hooks and jQuery selectors:
| FreeScout | bmsui-blade |
|---|---|
tr.conv-row[data-conversation_id], row_class | attributes on <x-bmsui::conversation-row> go on the row (class="conv-row" data-conversation_id="5") |
.conv-checkbox, .conv-star | :checkbox-attributes="['class' => 'conv-checkbox', 'data-conversation_id' => 5]", :star-attributes, :link-attributes (merged with ours) |
before_subject, after_subject, preview_prepend, td_before_conv_number, after_row | slots before-subject, after-subject, before-preview (inside the link: text/icons only), before-number (+ :number="1234"), after-row |
.table-conversations, <td> hooks | <x-bmsui::conversation-list as="table">: same look as <table>/<tr>/<td>; in table mode before-number and after-row are raw markup inside/after the <tr> |
.toggle-all, sorting | :select-all="false" :select-all-attributes="['class' => 'toggle-all']" (toggles the row checkboxes, sets indeterminate, fires bmsui:select-all); :sorts="[['key' => 'date', 'label' => 'Date', 'dir' => 'desc', 'href' => '?sort=date']]" (without href: bmsui:sort with detail.key/detail.dir); header slot for bulk actions |
.table-pager .pager-nav, count | :count="128" ("128 conversations"), pager and footer slots |
| star toggle | :starrable="true": a button with aria-pressed; a click flips it and fires bmsui:star (detail.starred, cancelable: preventDefault() reverts) |
thread.meta, thread.action_text, "…" menu, thread id | <x-bmsui::mail-message :thread-id="$t->id" :menu-items="[...]"> with slots meta, action-text, menu (own markup instead of menu-items), badges, actions |
| draft / note / line item | status="draft", direction="note", line items are <x-bmsui::mail-event :thread-id="..."> |
conversation.after_subject_block, conversation.action_buttons | slots of the page header (see Page header) |
Blade tip: when a named slot comes first, put a line break after its closing tag
(<x-slot:trigger>Info</x-slot:trigger> then content on the next line). Text directly after </x-slot:…>
in that position leaves an open output buffer in Laravel 12's compiler (true for every component).
Tokens
Colours and shapes are CSS variables on :root, overridden under .dm. A host maps its own variables onto them:
--bmsui-fg, --bmsui-muted, --bmsui-bg, --bmsui-surface, --bmsui-border, --bmsui-hairline, --bmsui-accent,
--bmsui-accent-fg, --bmsui-ring, --bmsui-radius, --bmsui-pill, --bmsui-{info,success,warning,danger}-{bg,fg,bd},
plus --bmsui-radius-lg (dialogs, cards, toasts), --bmsui-shadow-sm|md|lg (raised / menus and popovers / dialogs) and
--bmsui-accent-soft (hover/selected tint; it is derived from --bmsui-accent, so a host that changes the accent under
another selector sets it there too).
Install (Laravel)
composer require bmsuisse/bmsui-blade
php artisan vendor:publish --tag=bmsui-assets # copies bmsui.css / bmsui.js to public/vendor/bmsui
<head> @bmsuiAssets("css") </head>
<body> ... @bmsuiAssets("js") </body> {{-- or a single @bmsuiAssets for both --}}
Until it is on Packagist/your feed, require it from the repo with a path or vcs repository entry
pointing at php/bmsui-blade.
OneDesk / FreeScout
FreeScout has its own asset pipeline, so a module registers the two files through its hooks instead of
@bmsuiAssets. Put this in a module's service provider (e.g. in BMSDesign) after composer require:
use BMSuisse\BMSUi\BMSUi;
\Eventy::addFilter('stylesheets', fn ($s) => array_merge($s, [BMSUi::cssPath()]));
\Eventy::addFilter('javascripts', fn ($j) => array_merge($j, [BMSUi::jsPath()]));
If your asset pipeline needs files under public/, publish them (--tag=bmsui-assets) and use those
paths. Night mode follows automatically because BMS Design adds .dm to <body>. The components
render with Bootstrap 3 loaded (box-sizing, link and button resets are handled).
Preview and tests
view('bmsui::preview') renders every component (pass ['dark' => true] for night mode); mount it behind
your own auth on a route to review them.
composer install
vendor/bin/phpunit
Keeping it in sync with the React library
The design tokens, tones and the AI glow recipe come from packages/ui. When a component's look changes
there, change the matching class in resources/css/bmsui.css; the screenshots in docs/ come from
view('bmsui::preview').