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-skeleton init="loadData">Loaded content</x-bt-skeleton>
Skeleton → extends BeartropyComponentskeleton.blade.phpwire:loading / wire:loading.remove for visibility toggling| Prop | PHP Type | Default | Blade Attribute |
|---|---|---|---|
| init | ?string |
null |
init="loadData" |
| lines | int |
1 |
:lines="3" |
| rounded | string |
'lg' |
rounded="full" |
| tag | string |
'div' |
tag="span" |
| shape | ?string |
'card' |
shape="table" |
| rows | ?int |
null |
:rows="5" |
| cols | ?int |
null |
:cols="4" |
card (default)p-3, animate-pulse, bg-slate-200/90<h3> title bar (h-4, w-1/2)<p> lines with varying widths (w-full, w-4/5, w-3/5)lines=1, renders 3 default body lines (w-3/4, w-4/5, w-full)lines>1, renders exactly that many linesrectanglew-full h-full animate-pulse bg-slate-200/90imageaspect-[4/3] containertable$cols cells with flex-1, mb-1$rows rows x $cols cellsh-3 flex-1 roundednonelines > 1: stacked lines with varying widths in space-y-2 flex-collines <= 1: single block with min-h-[0.75rem] fallback (suppressed when wrapper has h-*/min-h-*/max-h-* class)none → rounded-none, sm → rounded-sm, md → rounded-md, lg → rounded-lg (default), xl → rounded-xl, full → rounded-full
init prop is provided (non-null, non-empty)[@if](https://github.com/if)($method) where $method = $init<div wire:loading.remove class="w-full h-full">class attribute for h-*, min-h-*, max-h-* via regexlines === 1 → applies min-h-[0.75rem]{{-- Card skeleton with wire:init --}}
<x-bt-skeleton init="loadData" :lines="3">
<x-bt-card>Real content</x-bt-card>
</x-bt-skeleton>
{{-- Without init (triggered by other actions) --}}
<x-bt-skeleton shape="rectangle" class="w-full h-24">
<p>Loaded</p>
</x-bt-skeleton>
{{-- Table skeleton --}}
<x-bt-skeleton shape="table" :rows="5" :cols="4" init="loadTable">
<table>...</table>
</x-bt-skeleton>
{{-- Image placeholder --}}
<x-bt-skeleton shape="image" class="w-full h-48" init="loadImage">
<img src="photo.jpg" />
</x-bt-skeleton>
{{-- Text lines --}}
<x-bt-skeleton shape="none" :lines="3" init="loadText">
<p>Loaded text</p>
</x-bt-skeleton>
{{-- Custom tag --}}
<x-bt-skeleton tag="span" init="load">Loaded</x-bt-skeleton>
{{-- Custom rounded --}}
<x-bt-skeleton rounded="full" shape="rectangle" class="w-12 h-12" />
init is optional — skeleton works without it for non-wire:init loading scenariosrows and cols only matter for shape="table"relative class is always applied to wrapper via $attributes->class(['relative'])dark:bg-slate-*)$skeletonClass prop was removed (unused)How can I help you explore Laravel packages today?