Layout
TwCard
TwCard is a Blazor card component for grouping content. Set Title, HeaderContent and Bordered, or lay cards out in a responsive grid.
Last updated
Basic Card
A simple card with a title and content.
Account Overview
Your account is in good standing. You have 3 active subscriptions.
Razor
<TwCard Title="Account Overview">
<p class="text-gray-600 dark:text-gray-400">
Your account is in good standing. You have <span class="font-semibold text-gray-900 dark:text-white">3</span> active subscriptions.
</p>
</TwCard>Card Without Border
Set
Bordered="false" to remove the border.Borderless Card
This card relies on shadow and background contrast alone.
Razor
<TwCard Title="Borderless Card" Bordered="false">
<p class="text-gray-600 dark:text-gray-400">This card relies on shadow and background contrast alone.</p>
</TwCard>Card With Header Content
Use
HeaderContent for custom header elements alongside the title.Team Members
Manage your team and their account permissions.
Alice Johnson
Admin
Bob Smith
Editor
Carol Williams
Viewer
Content-Only Card
A card with no title - just content.
Jack Thompson
Product Designer
Razor
<TwCard>
<div class="flex items-center gap-4">
<div class="w-12 h-12 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
<TwIcon Icon="Icon.Person" Class="text-blue-600 dark:text-blue-400 text-xl" />
</div>
<div>
<p class="font-semibold text-sm">Jack Thompson</p>
<p class="text-xs text-gray-600 dark:text-gray-400">Product Designer</p>
</div>
</div>
</TwCard>Card Grid
Cards work well in grid layouts.
Revenue
£24,500
+12.5% from last month
Orders
1,234
+8.2% from last month
Customers
567
+3.1% from last month
Razor
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<TwCard Title="Revenue">
<p class="text-2xl font-bold">£24,500</p>
<p class="text-sm text-green-700 dark:text-green-400 mt-1">+12.5% from last month</p>
</TwCard>
<TwCard Title="Orders">
<p class="text-2xl font-bold">1,234</p>
<p class="text-sm text-blue-600 dark:text-blue-400 mt-1">+8.2% from last month</p>
</TwCard>
<TwCard Title="Customers">
<p class="text-2xl font-bold">567</p>
<p class="text-sm text-purple-600 dark:text-purple-400 mt-1">+3.1% from last month</p>
</TwCard>
</div>Theme Configuration
Styling is controlled by
TwBlazorTheme.Components (a TwCardTheme), configured via the
AddTwBlazor() options callback described on the Get Started page.
Every property is a set of Tailwind classes, so changes are picked up by your own Tailwind build.
Full reference: TwCardTheme on the API docs.