beartropy/ui
Beartropy UI is a small Laravel UI package providing ready-made components and helpers to speed up building admin and front-end screens. Drop in common layouts, forms, and UI utilities to get a consistent look fast with minimal setup.
<x-bt-option value="AR" label="Argentina" />
<x-bt-option value="US" label="United States" icon="flag" avatar="/us.png" description="North America" />
Option extends Illuminate\View\Component (NOT BeartropyComponent — no presets needed)fn () => '')Select::$pendingSlotOptions[] during constructor<x-bt-select> slot — Select reads $pendingSlotOptions after slot evaluation| Prop | Type | Default | Blade Attribute |
|---|---|---|---|
| value | string |
(required) | value="AR" |
| label | ?string |
same as value | label="Argentina" |
| icon | ?string |
null |
icon="flag" |
| avatar | ?string |
null |
avatar="/img.jpg" |
| description | ?string |
null |
description="South America" |
// In constructor:
Select::$pendingSlotOptions[] = [
'_value' => $this->value,
'label' => $this->label ?? $this->value,
'icon' => Select::renderIcon($this->icon),
'avatar' => $this->avatar,
'description' => $this->description,
];
{{-- Basic options --}}
<x-bt-select name="color">
<x-bt-option value="red" label="Red" />
<x-bt-option value="blue" label="Blue" />
</x-bt-select>
{{-- With icons --}}
<x-bt-select name="status">
<x-bt-option value="active" label="Active" icon="check-circle" />
<x-bt-option value="inactive" label="Inactive" icon="x-circle" />
</x-bt-select>
{{-- Rich options --}}
<x-bt-select name="user">
<x-bt-option value="1" label="Ana" avatar="/ana.jpg" description="Admin" />
<x-bt-option value="2" label="Carlos" avatar="/carlos.jpg" description="Editor" />
</x-bt-select>
Component directly, NOT BeartropyComponent (no presets, no traits)render() returns a closure that returns empty stringSelect::renderIcon() normalizes icon (Heroicon name → rendered SVG, emoji → raw)$pendingSlotOptions is a static array on Select, cleared before each render_value key uses underscore prefix to distinguish from display labelHow can I help you explore Laravel packages today?