--- title: "card" description: "Container with header, content, and footer slots." category: "Layout" --- # card Container with header, content, and footer slots. ## Installation ```bash php artisan ui:add card ``` ## Dependencies - composer: `gehrisandro/tailwind-merge-laravel` ## Usage ```blade

Card content goes here.

Deploy
``` ## Example The demo rendered on the docs page. ```blade

Name, framework, and region are configured automatically.

Cancel Deploy
``` ## Source Copy this file to the path shown above it. `resources/views/components/ui/card.blade.php` ```blade @props([ 'title' => null, 'description' => null, ]) @php $classes = \TailwindMerge\Laravel\Facades\TailwindMerge::merge( 'flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm', $attributes->get('class'), ); @endphp
except('class')->merge(['class' => $classes]) }}> @if ($title || $description || isset($header))
@isset($header) {{ $header }} @else @if ($title)

{{ $title }}

@endif @if ($description)

{{ $description }}

@endif @endisset
@endif
{{ $slot }}
@isset($footer)
{{ $footer }}
@endisset
``` ## Theme tokens `--card`, `--card-foreground`, `--border`, `--muted-foreground`, `--radius` Slots: header, footer; or props title/description.