Skip to content
GitHub11 stars

Displays a card with header, content, and footer.

Login to your account
Enter your email below to login to your account
<Card Class="w-full max-w-sm">
    <CardHeader>
        <CardTitle>Login to your account</CardTitle>

Installation

dnx Blazix.Cli add card

Usage

<Card>
    <CardHeader>
        <CardTitle>Card Title</CardTitle>
        <CardDescription>Card Description</CardDescription>
        <CardAction>Card Action</CardAction>
    </CardHeader>
    <CardContent><p>Card Content</p></CardContent>
    <CardFooter><p>Card Footer</p></CardFooter>
</Card>

Composition

Use the following composition to build a Card:

Card
├── CardHeader
│   ├── CardTitle
│   ├── CardDescription
│   └── CardAction
├── CardContent
└── CardFooter

Size

Use the size="sm" parameter to set the size of the card to small. The small size variant uses smaller spacing.

Scheduled reports
Weekly snapshots. No more manual exports.
  • Choose a schedule (daily, or weekly).
  • Send to channels or specific teammates.
  • Include charts, tables, and key metrics.
<Card Size="CardSize.Sm" Class="mx-auto w-full max-w-xs">
    <CardHeader>
        <CardTitle>@FeatureName</CardTitle>

Spacing

In addition to the Size parameter, you can use the --card-spacing CSS variable to control the spacing between sections and the inset of card parts.

Login to your account
Enter your email below to login to your account
<div class="mx-auto grid w-full max-w-sm gap-4">
    <ToggleGroup Value="@([_spacing])" ValueChanged="SetSpacing" Variant="ToggleVariant.Outline" Size="ToggleSize.Sm" Class="justify-center">
        @foreach (var option in SpacingOptions)

Use negative margins with -mx-(--card-spacing) to make content go edge to edge while keeping it aligned with the card inset. When the edge-to-edge content sits above a footer, use -mb-(--card-spacing) on CardContent to remove the section gap.

Terms of Service
Review the terms before accepting the agreement.

These terms govern your use of the workspace, including access to shared documents, project files, and collaboration tools.

You are responsible for the content you upload and for ensuring that your team has the appropriate permissions to view or edit it.

We may update features or limits as the service evolves. When those changes materially affect your workflow, we will notify your workspace administrators.

By continuing, you agree to keep your account credentials secure and to follow your organization's acceptable use policies.

<Card Class="mx-auto w-full max-w-sm">
    <CardHeader>
        <CardTitle>Terms of Service</CardTitle>

Image

Add an image before the card header to create a card with an image.

Event cover
Featured
Design systems meetup
A practical talk on component APIs, accessibility, and shipping faster.
<Card Class="relative mx-auto w-full max-w-sm pt-0">
    <div class="absolute inset-0 z-30 aspect-video bg-black/35"></div>
    <img src="https://avatar.vercel.sh/blazix1" alt="Event cover" class="relative z-20 aspect-video w-full object-cover brightness-60 grayscale dark:brightness-40" />

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

تسجيل الدخول إلى حسابك
أدخل بريدك الإلكتروني أدناه لتسجيل الدخول إلى حسابك
نسيت كلمة المرور؟
<Card Class="w-full max-w-sm">
    <CardHeader>
        <CardTitle>@T.Title</CardTitle>

API Reference

Card

ParameterTypeDefault
Size CardSize CardSize.Default
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

CardAction

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

CardContent

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

CardDescription

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

CardFooter

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

CardHeader

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

CardTitle

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

Changelog

Spacing Variable

The card's padding and gaps come from the --card-spacing variable. Customize them by setting --card-spacing on the Card with an arbitrary property class:

<Card Class="[--card-spacing:--spacing(6)]">...</Card>