PHPackages                             davidgut/boson - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. davidgut/boson

ActiveLibrary[Templating &amp; Views](/categories/templating)

davidgut/boson
==============

Minimal, well-designed, flexible Laravel Blade components.

v1.0.1(1mo ago)00MITCSSPHP ^8.2

Since Mar 22Pushed 1mo agoCompare

[ Source](https://github.com/davidgut/bosonui)[ Packagist](https://packagist.org/packages/davidgut/boson)[ Docs](https://github.com/davidgut/bosonui)[ RSS](/packages/davidgut-boson/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Boson
=====

[](#boson)

Minimal, well-designed, flexible Laravel Blade components.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 12.0+

Installation
------------

[](#installation)

```
composer require davidgut/boson
```

The package auto-registers its service provider via Laravel's package discovery.

### Include CSS &amp; JS

[](#include-css--js)

Import the Boson stylesheet and script in your application's entry points:

```
/* resources/css/app.css */
@import '../../vendor/davidgut/boson/resources/css/boson.css';
```

```
// resources/js/app.js
import '../../vendor/davidgut/boson/resources/js/boson.js';
```

Then compile your assets as usual with Vite (or your bundler of choice).

Usage
-----

[](#usage)

All components are available under the `boson::` namespace:

```
Click me

Content goes here.

```

### Available Components

[](#available-components)

Accordion, Avatar, Badge, Button, Card, Checkbox, Combobox, Description, Dropdown, Error, Field, Form, Heading, Icon, Img, Input, Label, Link, Listbox, Modal, Navbar, Radio, Select, Separator, Spacer, Table, Textarea, Toast.

### Toasts

[](#toasts)

Flash toast notifications from your controllers or middleware using the `Toast` helper:

```
use DavidGut\Boson\Toast;

Toast::show('Something happened.');
Toast::success('Saved successfully!');
Toast::warning('Check your input.', 'Heads up');
Toast::danger('Something went wrong.');
```

All methods accept an optional `$heading` and `$duration` (in ms, default `5000`). Toasts are flashed to the session and rendered automatically by the `` component.

### Events

[](#events)

Boson includes a declarative event system via `on:` attributes — no inline JavaScript needed in your Blade:

```

Click me
```

Inside a handler, `$event` is the DOM event and `this` is the element. The system supports both native DOM events (`click`, `submit`, `keydown`, etc.) and custom Boson events (`success`, `error`, `open`, `close`, `change`, `select`, `deselect`, etc.).

You can also register custom events at runtime:

```
import { BosonEvents } from '../../vendor/davidgut/boson/resources/js/boson.js';

BosonEvents.register('myevent');        // custom (dispatched as boson:myevent)
BosonEvents.register('scroll', true);   // native
```

AI Rules Generation
-------------------

[](#ai-rules-generation)

Boson can generate a compact `.mdc` context file containing all component documentation, props, and usage examples — designed to be consumed by AI coding assistants.

```
php artisan boson:rules
```

This parses every Boson component's `@description`, `@usage`, and props, then writes a single `boson.mdc` file to your IDE's rules directory.

### Options

[](#options)

OptionDefaultDescription`--ide=``cursor`Target IDE: `cursor` (writes to `.cursor/rules/`) or `antigravity` (writes to `.agent/rules/`)`--output=`*(auto)*Custom output directory`--canary``false`Include a verification string to test context loadingThe canary flag can also be enabled globally via the `boson.rules.canary` config option.

Publishing
----------

[](#publishing)

Publish the config file:

```
php artisan vendor:publish --tag=boson-config
```

Publish the views for customization:

```
php artisan vendor:publish --tag=boson-views
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE) for details.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

49d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a1163b75d4f25d863e452d8118eb3b266c29656783beb9a9c02c9498ced60b8e?d=identicon)[davidgut\_](/maintainers/davidgut_)

---

Tags

laraveluicomponentsbladeboson

### Embed Badge

![Health badge](/badges/davidgut-boson/health.svg)

```
[![Health](https://phpackages.com/badges/davidgut-boson/health.svg)](https://phpackages.com/packages/davidgut-boson)
```

###  Alternatives

[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[area17/blast

Storybook for Laravel Blade

308664.1k](/packages/area17-blast)[electrik/slate

Slate - a Laravel Blade UI Kit is a set of anonymous blade components built using TailwindCSS v4 with built-in dark mode support for your next Laravel project

102.3k1](/packages/electrik-slate)[ddfsn/blade-components

Blade Components is a hand-crafted, UI component library for building consistent web experiences in Laravel apps.

193.1k](/packages/ddfsn-blade-components)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
