Card
Card component.
Card, Customization Blocks
Example:
// AppServiceProvider, "boot" method. TallStackUi::customize() ->card() ->block('block', 'classes');
<x-card> TallStackUI</x-card>
<x-card> <x-slot:header> Raw HTML content </x-slot:header> TallStackUI</x-card> <!-- or --> <x-card header="TallStackUI"> TallStackUI</x-card>
<x-card header="TallStackUI" minimize> TallStackUI</x-card> <!-- or --> <x-card minimize> <x-slot:header> TallStackUI </x-slot:header> TallStackUI</x-card>
You can also mount as minimized:
<x-card header="TallStackUI" minimize="mount"> TallStackUI</x-card>
<!-- Top position --><x-card image="https://picsum.photos/750/300"> TallStackUI</x-card> <!-- Bottom position --><x-card position="bottom" image="https://picsum.photos/750/300"> TallStackUI</x-card>
An option to control the border radius of the card wrapper.
{{-- Default radius (rounded-lg). --}}<x-card> TallStackUI</x-card> {{-- Bare flag preserves the default radius. --}}<x-card round> TallStackUI</x-card> <!-- Accepted sizes: xs, sm, md, lg, xl, 2xl --> <x-card round="xs"> TallStackUI</x-card> <x-card round="sm"> TallStackUI</x-card> <x-card round="md"> TallStackUI</x-card> <x-card round="lg"> TallStackUI</x-card> <x-card round="xl"> TallStackUI</x-card> <x-card round="2xl"> TallStackUI</x-card>
round
keeps the historical
default (rounded-lg
). Pass a size between
xs
and 2xl
to override the wrapper radius.
<!-- Accepted colors: primary, secondary, and ANY other TailwindCSS color. --> <!-- Normal --><x-card header="TallStackUI" color="primary"> TallStackUI</x-card> <!-- Light Variation --><x-card header="TallStackUI" color="primary" light> TallStackUI</x-card> <!-- Border Only --><x-card header="TallStackUI" color="primary" bordered> TallStackUI</x-card>
An option to set the card in a loading state.
<x-card loading> TallStackUI</x-card> <!-- You can use all the Livewire delay options: shortest, shorter, short, long, longer, longest --> <x-card loading="save" delay="longest"> TallStackUI</x-card>
Even if you use the header
slot to set a raw HTML content the loading effect will be visible
An option to listen to events when the card state changes.
<x-card header="TallStackUI" minimize x-on:minimize="alert('Minimized!')" x-on:maximize="alert('Maximized!')" x-on:close="alert('Closed!')"> TallStackUI</x-card>