View laravel-hotwire on GitHub
1M
v0.91.0
Search 71 components and 72 controllers by name, category or description.
Card
Composable content card with header, title, description, action, body and footer
Composition
Revenue
Last 30 days
$12,400
+18% vs last period
Updated now
Compact card
Uses size="sm".
Ideal for dense dashboards or sidebar summaries.
<hw:card>
<hw:card.header>
<hw:card.title>Revenue</hw:card.title>
<hw:card.description>Last 30 days</hw:card.description>
<hw:card.action>
<hw:button size="sm" variant="outline">Export</hw:button>
</hw:card.action>
</hw:card.header>
<hw:card.content>
<p class="text-2xl font-semibold">$12,400</p>
<p class="text-sm text-muted-foreground">+18% vs last period</p>
</hw:card.content>
<hw:card.footer>
<span class="text-sm text-muted-foreground">Updated now</span>
</hw:card.footer>
</hw:card>
<hw:card size="sm">
<hw:card.header>
<hw:card.title>Compact card</hw:card.title>
<hw:card.description>Uses size="sm".</hw:card.description>
</hw:card.header>
<hw:card.content>
Ideal for dense dashboards or sidebar summaries.
</hw:card.content>
</hw:card>
Custom spacing
Override `--card-spacing` for a single instance.
Roomier padding
Header, content and footer follow the same token.
Content still uses the same spacing scale so nothing looks out of place.
<hw:card class="[--card-spacing:--spacing(8)]">
<hw:card.header>
<hw:card.title>Roomier padding</hw:card.title>
<hw:card.description>Header, content and footer follow the same token.</hw:card.description>
</hw:card.header>
<hw:card.content>
Content still uses the same spacing scale so nothing looks out of place.
</hw:card.content>
<hw:card.footer>
<hw:button size="sm">Continue</hw:button>
</hw:card.footer>
</hw:card>