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-badge>Label</x-bt-badge>
Badge → extends BeartropyComponentbadge.blade.php (single template, no base delegation)resources/views/presets/badge.php (variant → color → classes)resources/views/presets/sizes.php| Prop | PHP Type | Default | Blade Attribute |
|---|---|---|---|
| color | ?string |
null |
color="red" |
| size | ?string |
null |
size="lg" |
| variant | ?string |
null |
variant="outline" |
| label | ?string |
null |
label="Text" |
| icon | ?string |
null |
icon="check" |
| iconLeft | ?string |
null |
icon-left="star" |
| iconRight | ?string |
null |
icon-right="arrow-right" |
solid)solid, soft, outline, tint, glass
beartropy)beartropy, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
sm)xs, sm, md, lg, xl
| Slot | Description |
|---|---|
| default | Badge content (can combine with label prop) |
| start | Content before left icon |
| end | Content after right icon |
icon is a shorthand for iconLeft$icon ?? $iconLefticon winsmr-1, right icon gets ml-1colors → {variant} → {color} → {bg, text, border?}
5 variants × 18 colors = 90 color presets.
solid / soft / tint: bg + text (no border)outline: bg (transparent) + text + borderglass: bg (backdrop-blur) + text + border{{-- Basic --}}
<x-bt-badge>New</x-bt-badge>
{{-- Label prop --}}
<x-bt-badge label="Status" />
{{-- Variant + Color --}}
<x-bt-badge soft red>Soft Red</x-bt-badge>
{{-- Size --}}
<x-bt-badge sm green>Small Green</x-bt-badge>
{{-- Icon shorthand --}}
<x-bt-badge icon="check-circle" green label="Approved" />
{{-- Left and right icons --}}
<x-bt-badge icon-left="star" icon-right="chevron-down" label="Featured" />
{{-- Dynamic color --}}
<x-bt-badge :color="$status === 'active' ? 'green' : 'red'">{{ $status }}</x-bt-badge>
{{-- Start slot with status dot --}}
<x-bt-badge blue>
<x-slot:start>
<span class="inline-block w-2 h-2 rounded-full bg-blue-500 mr-1.5"></span>
</x-slot:start>
Online
</x-bt-badge>
'badge' => [
'color' => env('BEARTROPY_UI_BADGE_COLOR', 'beartropy'),
'size' => env('BEARTROPY_UI_BADGE_SIZE', 'sm'),
],
label and slot content are NOT mutually exclusive — both render ({{ $label }}{{ $slot }})<span> output — no nested base component$getComponentPresets('badge') called with 2 args (config provides defaults)How can I help you explore Laravel packages today?