Components

170 Blade components for Laravel, plus two pagination views. Presentation only: no state, no framework assumptions beyond Blade itself.

New here? Start with Getting started — install, three lines of CSS, the one line that everything depends on, and the script include.

Guides

Upgrading and translating

Upgrading from 1.xWhat to add, the names 2.0 reads as props, and every 1.x component whose output changed
TranslatingThe ds:: language files, publishing them, a second locale, and the words the script speaks

Components

Every page has a screenshot showing light and dark side by side, the full prop table, copy-paste examples, and the mistakes worth avoiding.

Forms

ButtonDoes something, or goes somewhere
InputText field, textarea, native select
OTP inputA one-time code, one box per character — needs Alpine and the script
Tag inputTyped values kept as chips — needs Alpine and the script
Number fieldA bounded number with step buttons — needs Alpine and the script
SliderA number, or a range of two, on a track — needs Alpine and the script
Money inputAn amount, grouped for the locale as it is typed; posts a decimal string, never a float — needs Alpine and the script
Phone inputA country from a searchable list and a number formatted as typed; posts E.164 — needs Alpine and the script
Shortcut inputA keyboard shortcut set by pressing it; posts mod+shift+k — needs Alpine and the script
Mention inputA textarea that suggests people after @ (or # for anything else) and posts their ids beside the text — needs Alpine and the script
Colour pickerA colour from a panel, typed in any common form, or from presets, with its contrast — needs Alpine and the script, but for presets alone
Time pickerA time of day, typed or picked from a list; posts HH:MM — needs Alpine and the script
Inline editText that turns into a field in place: rename a title, edit a cell — needs Alpine and the script
Sortable listRows put in order by drag, keyboard or buttons; posts the order — needs Alpine and the script
Password strengthA strength hint for a new password, and reveal — needs Alpine and the script
Copy buttonCopies a value and confirms in place — needs Alpine and the script
Swap buttonA button whose face confirms what it did: Save to Saved, Follow to Following — needs Alpine and the script
Confirm buttonA destructive button that asks in place first — needs Alpine and the script
Hold buttonConfirmed by holding it, or by pressing twice — needs Alpine and the script
RatingStars to choose a score, or to show one
Chip groupPressable filter chips, one or many, or links
Filter barSearch, controls, applied filters as chips, Clear all; folds on a phone
Segmented controlOne of a few views or modes, side by side
Button groupRelated buttons joined into one shape, the split button, and icon buttons that expand to their labels
ToolbarA row of tools that is one Tab stop — needs Alpine and the script
Toggle groupButtons that stay pressed, one or many — needs Alpine and the script
Theme switcherLight, dark or system, remembered, with the pre-paint script — needs Alpine and the script
Radio cardsCard-shaped options to compare: plans, shipping
SelectStyled listbox — needs Alpine
ComboboxFiltering select, single or multiple — needs Alpine
SwitchA setting that takes effect
Date pickerA calendar popover, one date or a range, with presets — needs Alpine and the script
CalendarA month grid, always visible: a day, a range or several, with markers — needs Alpine and the script
File uploadDrop zone with local previews, and rows showing your uploader's progress — needs Alpine
Save bar"You have unsaved changes — Discard, Save" while a form differs from what it loaded with — needs Alpine and the script
Avatar uploadA profile photo or logo, cropped square in the browser and posted as a file — needs Alpine and the script
CheckboxOne independent yes/no
RadioOne of a set, plus the group

Layout & content

PanelBordered card, with rows or free-form
TableRows of records, scrolling in its own box, with sortable headers and selectable rows; a tree table needs Alpine and the script
Selection bar"3 selected", the bulk actions and Clear, over a selectable table; Select all across pages — needs Alpine and the script
Notification listA notification centre's rows: grouped, unread, a stretched link, inline actions, Mark as read
Stat tileOne number, with its change
Metric tickerA strip of live figures with changes and trends: wrapping, scrolling or a pausable marquee
AccordionSections that expand one at a time — needs Alpine
Empty stateWhat a region says when it has nothing
SkeletonA picture of content that is still loading
Skeleton swapSkeletons, then the content, in one place: a crossfade on aria-busy, with Livewire's wire:loading and no script
LoaderA small busy indicator: spinner, dots, bars, pulse or morph, still under reduced motion
ShimmerA light band across "Thinking…" text
ProgressHow far along a task is, as a bar or a ring
Usage meterAn allowance and what fills it
Upgrade promptA limit near or reached: the meter, what the next plan adds, the way to it; a gate in place of locked content
ChecklistOnboarding, "3 of 5 done": steps the host detects as done, each a link to the task
JSON viewerA JSON document as a tree that opens and closes; keys, Expand all and node copying need Alpine and the script
Code blockCode to read and copy, with line numbers and highlighted lines; bring your own highlighter
KbdA key on the keyboard, inline in text
DividerA line across or up, with an optional word in the middle
Expandable textText held to a few lines with Read more — needs Alpine and the script
Scroll areaA bounded box that scrolls natively, with a quiet scrollbar and edge shadows
SplitPanes with a divider to drag between them, nested if need be — needs Alpine and the script
Swipe actionsA list row that slides sideways to show its actions, with a More button for everyone else — needs Alpine and the script
Pull to refreshPull a list down at its top to refresh it, with a Refresh button for everyone else — needs Alpine and the script

Data

CounterA number that rolls its digits when it changes — the roll needs Alpine and the script
SparklineA small trend with no axes: line, area or bars
GaugeOne reading against a range, as an arc, with thresholds
Activity heatmapA count for every day, as a grid of shades
Bar chartValues compared across categories: grouped or stacked, vertical or horizontal — the readout needs Alpine and the script
Line chartValues in order over time, up to eight series, with gaps — the readout needs Alpine and the script
Donut chartThe parts of one whole, with the total in the middle — the readout needs Alpine and the script
Split barThe parts of one whole as one bar, with room left if there is a total — the readout needs Alpine and the script
Waffle chartA share as cells of a 10 × 10 grid, one cell a percent — the readout needs Alpine and the script
Activity ringsUp to four goals as concentric rings, each against its own target — the readout needs Alpine and the script
Slope chartA handful of items before and after, the change written on each — the readout needs Alpine and the script
Funnel chartStages of a conversion, with the drop between each written out — the readout needs Alpine and the script
Radar chartUp to four items scored across three to eight axes — the readout needs Alpine and the script
TreemapThe parts of a whole as nested rectangles, one level of groups — the readout needs Alpine and the script
TimelineEvents in order on a rail, with groups under sticky headings

Which chart? Start from the question.

The questionUse
One number, and is it changing?Counter, in a stat tile with a sparkline for the trend
One reading in a range, with bands (CPU, latency)?Gauge
How busy was each day?Activity heatmap
How do these categories compare?Bar chart, sorted; horizontal for long names
How did it move over time?Line chart
What is one whole made of?Split bar in a line, donut chart with the total in the middle, waffle chart as a count of 100
What share is one part?Waffle chart with one number, or a progress bar
How far toward several goals?Activity rings
What changed between two moments, item by item?Slope chart
How many made it through each step?Funnel chart
How do a few items score across several qualities?Radar chart for the overall shape; a grouped bar chart to compare exact scores
What is a whole made of, when it has many parts or groups of parts?Treemap
How much of an allowance is used?Not a chart: a usage meter

Navigation

Top navThe horizontal app bar: brand, links, link groups, actions; folds into a drawer on a narrow bar
Nav itemA row in the sidebar rail
Sub-navA rail section holding its pages — needs Alpine
SidebarThe app's nav column: a rail that folds to icons and remembers it, a drawer on a phone, one nav in both — needs Alpine and the script
Bottom navThe phone's primary navigation
TabsOne row, several views
LinkWords you follow: underlined, in three colours that pass on every surface, external ones saying so
BreadcrumbWhere this page sits
Page headerA page's title as its h1, with breadcrumb, status, description, actions that fold into More, and tabs
StepperWhere someone is in an ordered flow
PaginationTwo Laravel paginator views, each with a Livewire variant
TreeNested items: a file browser, a docs sidebar, a checkbox tree — needs Alpine and the script
User menuThe account menu: avatar, who is signed in, your items, theme, a sign-out that POSTs — Alpine
Team switcherSwitch workspace or team, with a search when the list is long — needs Alpine and the script; a select or links without

Overlays

ModalBlocks the page until it is answered — Alpine
DrawerAn edge panel to work in — Alpine
SheetThe mobile form of either, with snap points and drag (those need the script) — Alpine
Share sheetWho has access and the link: roles, general access, copy, the device's share sheet — posts as a form
DropdownA menu of actions — Alpine
PopoverAnything else anchored to a button: fields, a form — needs Alpine and the script
Confirm popoverA question anchored to its button, with optional type-to-confirm — needs Alpine and the script
Hover cardA preview of a person or a link on hover or focus — needs Alpine and the script
Context menuThe dropdown's menu at the pointer: right-click, long press, Shift+F10 — needs Alpine and the script
Command paletteActions and destinations, searched from a shortcut (Cmd+K) — needs Alpine and the script
TooltipA short label on hover or focus — Alpine
ToastSomething already happened

Marks

IconA Heroicon, sized by the system
Icon swapTwo icons that turn into each other with their button's state: menu and close, play and pause
AvatarA person or a thing, at a glance
Avatar groupA few faces from a larger set, overlapping
Presence stackWho is here now, with status and activity; arrivals and departures animate — needs Alpine and the script
BadgeA small label that annotates
AlertSomething about the page you are on
Announcement barA banner above the app for everyone: maintenance, a trial, news; dismissal needs Alpine and the script
Trial banner"Your trial ends in 5 days", counted on the server, as a bar or a card; dismissal needs Alpine and the script

Media

Photo gridPhotos as tiles: a grid, masonry or justified rows, "+N" past a maximum; its lightbox needs Alpine and the script
LightboxPhotos one at a time, large, with swipe, zoom and thumbnails — needs Alpine and the script
Link previewA URL as a card from metadata your server fetched, with the safe-fetching recipe; dismissal needs Alpine and the script
Audio playerA recording with its own controls, a waveform and a transcript that follows along — needs Alpine and the script
Dictation buttonA microphone that types what is said into a field, where the browser can — needs Alpine and the script

AI

Showing agent activityHow the five fit together on a page where an agent works, with a Livewire recipe
Reasoning"Thinking…" that becomes "Thought for 12 seconds", open while it runs and following the text
Agent statusWhat an agent is doing right now, as a pill, a row or inline, announced once per change; the shared status set
Tool callOne tool invocation with its arguments and result, approval, and a group that folds calls into "Used 4 tools"
Agent planThe agent's plan as a live task list: statuses, the current step, substeps, a compact line
Agent timelineA run's trace on the timeline: markers by kind, a dashed rail ahead, earlier steps folded, follow
Chat building blocksHow the seven below fit around a chat: an empty state, an answer with sources and feedback, a handoff, and a providers settings page
Starter promptsSuggested prompts on an empty chat, as chips or cards, that send, fill the message box or link
SourcesNumbered source cards under an answer, and the citations in its text that preview them
Response feedbackThumbs up and down, copy and your actions, with reasons and a comment after a thumbs down; needs Alpine and the script without an action
Agent handoffWork passing from one agent or person to another, as a row or a divider
Generation statsModel, tokens, time, speed, cost and an unusual stop, on a line, a table or behind an info button
API key fieldEnter, test, replace and remove a provider's key without the page ever holding it; a panel of them for several providers
Provider statusWhether each provider is up, as a list or grid with recent checks, or one summary pill

Blocks

Whole screens built from the components above, to copy into an app and wire up: the markup, what the host supplies, and the states that matter. A block ships nothing of its own: no component, no script, no CSS. Each page's markup is the exact Blade the test suite renders, so it compiles and passes the same accessibility checks.

Block pages live in components/ as block-<name>.md, because the docs site renders only the pages under components/; their screenshots are images/block-<name>.png, and images/block-<name>-phone.png for a whole page.

Every block assumes a base layout, a component that writes the document around it: the CSS, the theme script, the package's script and Alpine in the head, and the app's ground on the body. Each block's view is wrapped in <x-layouts.base title="…">, or, for a screen inside the app, in <x-layouts.app title="…">: one of the two app shells below, which wraps the base layout in the app's frame.

The blocks draw their own landmarks (header, main, footer), so the layout draws none. Icons are Heroicons through Icon, which the package already requires.

Sign inEmail, then a six-digit code: wrong and expired codes, too many attempts, resend after a wait
Sign upName, email, a new password with its strength, the terms; field errors with a summary, then "check your inbox"
Two-factor setupScan a QR code or type the key, confirm with a code, save the recovery codes; wired to Laravel Fortify
Multi-step formA four-step wizard: per-step validation, progress in the heading and focus moved to it, a review with Edit links, success; no script needed
Every input typeEvery form control, as it starts and with an error, with required and disabled in each section, section links and the save bar; the package's tests keep it complete
App shell with sidebarThe app's layout: workspace, pages and account in a sidebar that collapses to icons (remembered by a cookie) and is a drawer on a phone; search, notifications and the theme above the page
App shell with top navThe other layout: everything in one bar with a menu group, folding into a drawer on a phone, and an optional second row for a section's pages
Page headerThe top of a list page, a detail page and a settings page: actions that fold into More, the way back, status and people, tabs
Command paletteCtrl+K or Cmd+K anywhere: pages and actions from a config array, recent issues, empty and loading states; searching on the server with Livewire
Notification centerThe bell and its unread count, a popover on a desktop and a drawer on a phone, mark as read, invitations answered in place, and a page of them all with All and Unread
Settings pageA workspace's settings, a form per section with its own save bar: name, address, logo and time zone; switches and choices; a grid of notification defaults; deleting it behind a typed confirmation; the settings nav the next four share
Team membersInvite by email against a seat limit, pending invitations, roles changed in place and saved together, remove with a confirmation, the owner protected; filters, an empty match, every seat taken
Roles and permissionsBuilt-in and custom roles, and a grid of permissions by role with a box per area that sets the lot, mixed when part granted; the owner locked; one role at a time on a phone
API keysKeys with scopes, last use, expiry and status, filtered by tabs; a new key shown once with a copy button; revoke; wired to Laravel Sanctum
Billing overviewThe plan and its price, usage against each limit with an upgrade prompt near one, the card as words, billing details, invoices to download; a trial, a failed payment, a plan ending; the card form left to your payment provider
Data table pageA list to work through: search, filters with presets and chips, status counts, sorting, row selection with bulk Archive and Delete across pages, row menus, per page and pagination; loading, empty, no match and error; all of it plain links and forms
Metrics dashboardA period's numbers against the period before: today so far, four headline figures, a line, bars, a donut and a funnel, the busiest projects with sparklines, latest activity, goals as bars, rings and a gauge; loading and an empty period; every chart drawn on the server with its values as a table

See everything at once

dist/gallery.html is a single self-contained page rendering every component in both themes, with a token and type reference. Open it in a browser.

It is generated from the real components rather than drawn to look like them, so if one is broken, the gallery is broken too.

Which components need JavaScript

No Livewire, ever. The package requires php, illuminate/support, illuminate/view and blade-heroicons — nothing else. Everything works in a plain Blade view. The one opt-in exception is the pagination views' Livewire variants, which emit wire:click for a component that uses WithPagination.

Alpine — a single 15 kB script, not a framework — is needed by fifty-two components, and by optional props on others:

Needs Alpine
modal drawer sheet dropdown select combobox accordion file-upload tooltip user-menuAlways. Their whole behaviour is state the browser has no markup for.
otp-input tag-input number-field password-strength copy-button toolbar toggle-group theme-switcherAlways, and the package's script too. Each renders its value from PHP and posts without JavaScript, but its behaviour is the script's.
popover hover-card context-menuAlways, and the package's script too. Without them the panel never opens.
confirm-button hold-button confirm-popoverAlways, and the package's script too. Without them each renders its first face and does nothing, so no single press ever carries out the action.
treeAlways, and the package's script too. Without them it is drawn as PHP rendered it (open folders, the selection, every link reachable) and posts what it shows, but does not open, close or choose.
expandable-textAlways, and the package's script too. Without them the text is shown in full and no button appears.
slider time-picker inline-editAlways, and the package's script too. Without them each is the native field it is drawn on and posts its value: a single slider works fully (its fill stays put) and a range's two thumbs can cross (a histogram stays as the server drew it, and inputs stay hidden), the time picker is the browser's own time field, and the inline edit is a plain field inside its form.
command-paletteAlways, and the package's script too. Without them it stays closed and does nothing; keep a visible route to everything in it.
sortable-listAlways, and the package's script too. Without them it is a plain list in the server's order, which posts that order, with no handles.
splitAlways, and the package's script too. Without them the panes are fixed at their sizes and the dividers are plain lines.
swap-buttonAlways, and the package's script too. Without them it shows the face the server drew and is an ordinary button that still submits or links.
team-switcherAlways, and the package's script too. Without them it is a native select in a form with a submit button, or a list of links.
money-input phone-input shortcut-inputAlways, and the package's script too. Without them each is a plain field that posts: the money input a text field posting what was typed, the phone input a select and a tel field posting name[country] and name[number] rather than E.164, the shortcut input a text field holding the string.
mention-inputAlways, and the package's script too. Without them it is an ordinary textarea posting its text, and the ids of the mentions the server found in it.
color-pickerAlways, and the package's script too, but for presetsOnly, which is native radios and needs neither. Without them the browser's own colour input stands in for the panel, posting #rrggbb.
date-picker calendarAlways, and the package's script too. Without them each posts from native date fields (two for a range): the date picker shows them in place of its button, the calendar under the grid the server drew.
avatar-uploadAlways, and the package's script too. Without them it is a plain file input posting the original photo, for the server to crop, and a Remove checkbox.
save-barAlways, and the package's script too. Without them it is a row of Save and Discard at the end of the form, always shown: the form's own submit and reset.
selection-barAlways, and the package's script too. Without them its actions always show and post the rows checked in the table; Clear selection and the table's select-all box are not drawn.
swipe-actionsAlways, and the package's script too. Without them the actions sit after the row's content as ordinary buttons.
pull-refreshAlways, and the package's script too. Without them it is its Refresh button: a link, or a submit for its form.
presence-stackAlways, and the package's script too, for its tooltips and the "+K" popover. Without them the faces show, named, with their status. Its fade-out and announce are an enhancement on top.
lightboxAlways, and the package's script too. Without them its openers are plain links to the full photos.
audio-playerAlways, and the package's script too. Without them it is the browser's own audio player, and its transcript plain text.
dictation-buttonAlways, and the package's script too, and a browser with speech recognition. Without them no button is shown.
sheetIts snap points and drag need the package's script as well. Without it the sheet opens at its natural height.
share-sheetNever. Its controls post as a form. With Alpine each change is also dispatched as an event, and the device share button appears where the browser has one.
icon-swapNever. It reads its button's state from CSS.
scroll-areaNever. It scrolls natively. With Alpine and the package's script it also draws its edge shadows in a browser that cannot from CSS.
sub-navOnly to open and close. Without it the section holding the current page is open and the rest are closed, as the server rendered them.
counterNever, unless its value is bound to Alpine state. With Alpine and the package's script its digits roll; without them it shows the number the server rendered, and a re-render changes it. Bound with ::value, it needs both.
bar-chart line-chart donut-chart split-bar waffle-chart activity-rings slope-chart funnel-chart radar-chart treemapNever. With Alpine and the package's script, a readout on hover and focus, every mark reachable by keyboard, and legend toggles; without them each is a static SVG with a generated text alternative, which is complete. A treemap's links are links either way.
segmented-controlNever. With Alpine and the package's script, its highlight slides; without them, the chosen segment draws its own face, and nothing throws.
inputOnly for reveal and clearable, which also need the package's script, and for expanding's Escape and shortcut; an expanding search opens and closes from CSS without them.
kbdOnly for shortcut, and then only to draw it for a Mac: without Alpine and the script it shows Ctrl + K.
tableOnly for tree, which also needs the package's script. With JavaScript off a tree table shows every row and no toggles. selectable boxes post without either; the select-all box and Shift ranges need both.
top-navOnly to fold into its drawer (collapseAt, on by default) and to close a link group on Escape or a press outside. Without it the links wrap and a group is a native disclosure.
page-headerOnly for collapseActions, whose More menu is a dropdown. Without it the secondary actions show as buttons.
file-upload-item notification-itemOnly for their buttons (Cancel, Retry, Remove; Mark as read, Dismiss), which also need the package's script: each dispatches an event. Without them the rows show, and a notification is a link.
json-viewerOnly for its copy button (on by default), which needs Alpine; its keys, Expand all and node copying also need the package's script. Without them every node opens and closes natively.
metric-tickerNever. Its marquee and pause button are CSS and a plain handler. With Alpine and the package's script its figures roll, as counter's do.
code-blockOnly for its copy button (on by default) and expandable, which also need the package's script. Without them the code shows and scrolls.
filter-barOnly for collapsible, which also needs the package's script.
panelOnly for collapsible. Without it the body shows as open says.
checkboxOnly for indeterminate. Without it the box renders unchecked — which is what a screen reader announces, so the feature is absent rather than lying.
nav-itemOnly for collapsedWhen. Omit it for a permanently expanded rail.
sidebarAlways, and the package's script too. Without them it is a column of links: beside the page from drawerBelow up, above it below that; it neither folds nor opens as a drawer.
toastOnly for dismiss, which takes an expression that removes the toast, and duration and actionLabel, the undo toast's timer and action.
skeleton-swapOnly for event. Its swap is CSS on aria-busy, which the server, Livewire's wire:loading or your own binding can set with no script.
checklistOnly for collapsible, and dismissKey, which also needs the package's script. Its items open and close natively.
trial-bannerOnly for dismissKey, which also needs the package's script. Without them it shows with no close control.
upgrade-prompt loader shimmerNever. The prompt's close control is a plain handler, as the alert's.
reasoning tool-call tool-call-group agent-timelineNever. Each is native details. With Alpine and the package's script a re-render keeps what the reader opened or closed; without them a re-render sets it as the server says. A tool call's copy buttons (on by default) need both.
agent-status agent-planNever.
starter-promptsNever. Each suggestion is a link or a submit button posting the prompt. With Alpine and the package's script, for fills a field instead, and each press dispatches select.
sources source-card agent-handoff provider-statusNever.
citationOnly for its preview, which also needs the package's script. Without them it is a link to its source card.
generation-statsNever. Its popover is native details; with Alpine it also closes on Escape and outside presses, and with the script it stays on screen.
response-feedbackAlways, and the package's script too, unless it has an action: then it is an ordinary form that posts the rating, and the script only spares the reload.
api-key-field provider-keysOnly for the reveal toggle, Remove (which asks first, so without the script it does nothing) and Test's test event, which also need the package's script. The key, Test and Save post as a form.
announcement-barOnly for dismissible and dismissKey, which also need the package's script. Without them the bar shows with no close control.
photo-gridOnly for lightbox, which also needs the package's script. Without them each tile is a link to its photo.
link-previewOnly for dismiss, which also needs the package's script. Without them the preview shows with no remove button.
pagination-livewire simple-pagination-livewireFor the scroll back to the top on a page change. Livewire brings its own Alpine, so there is nothing to add.
Everything elseNever.

The package also ships a small script of its own, the behaviours several components share, which goes in the layout as <x-ds::scripts /> above Alpine. The thirty above that need it, and sheet's snap points, input's reveal, table's tree, json-viewer's keys and node copying, the agent components' kept disclosures, starter-prompts' for, citation's preview, response-feedback, api-key-field's reveal and Remove, photo-grid's lightbox, and the dismissal of announcement-bar, trial-banner, checklist and link-preview, say so at the top of their pages. See Add the script.

stat-tile pushes its own count-up script to a scripts stack — plain JavaScript, no framework. Without @stack('scripts') in your layout the tile still renders the final value correctly.

Docs, or specs?

Two sets of documents, for two questions.

AnswersAudience
docs/ (here)How do I use this?Anyone building with the package
specs/Why does it work that way?Anyone changing the package, or porting it

Every page here links to its spec. The specs carry the anatomy, the tokens behind each part, the accessibility contract, and the reasoning — including the bugs that produced each rule. Read one when a component surprises you, or before you change it.

Reporting something

If a component renders wrongly, the fastest useful bug report is a screenshot in both themes and the Blade that produced it. Most visual bugs in this system's history were invisible in the source and obvious in a picture.


From the package repo: edit this page on GitHub.

Was this page helpful?