Card
The main building block of an admin page: a box that groups a title, content and actions.
<twig:Tabler:Card title="Active users" text="1,284 users signed in during the last 30 days." footer="Updated 5 minutes ago" /><div class="card"> <div class="card-header"><h3 class="card-title">Active users</h3></div> <div class="card-body">1,284 users signed in during the last 30 days.</div> <div class="card-footer">Updated 5 minutes ago</div></div>Composed
Section titled “Composed”Use the sub-components for anything richer than a string. Card:Actions sits at the end of the header; wrap the title
and the subtitle in a <div> so they stack:
<twig:Tabler:Card> <twig:Tabler:Card:Header> <div> <twig:Tabler:Card:Title>Invoice #2026-0142</twig:Tabler:Card:Title> <twig:Tabler:Card:Subtitle>Acme Corp, due October 31</twig:Tabler:Card:Subtitle> </div> <twig:Tabler:Card:Actions> <twig:Tabler:Button variant="primary" size="sm">Send</twig:Tabler:Button> </twig:Tabler:Card:Actions> </twig:Tabler:Card:Header> <twig:Tabler:Card:Body> Total: <strong>$4,320.00</strong>, 3 line items. </twig:Tabler:Card:Body> <twig:Tabler:Card:Footer>Created by Jane Doe on October 1</twig:Tabler:Card:Footer></twig:Tabler:Card><div class="card"> <div class="card-header"> <div> <h3 class="card-title">Invoice #2026-0142</h3> <div class="card-subtitle">Acme Corp, due October 31</div> </div> <div class="card-actions"><button type="button" class="btn btn-sm btn-primary">Send</button></div> </div> <div class="card-body"> Total: <strong>$4,320.00</strong> , 3 line items. </div> <div class="card-footer">Created by Jane Doe on October 1</div></div>Status
Section titled “Status”status adds a colored border, on the top edge by default. statusPosition moves it to the bottom or the
start:
<div class="row row-cards"> <div class="col-sm-4"> <twig:Tabler:Card status="success" title="api-1" text="Healthy, 99.98% uptime." /> </div> <div class="col-sm-4"> <twig:Tabler:Card status="warning" statusPosition="bottom" title="api-2" text="High latency: 820 ms." /> </div> <div class="col-sm-4"> <twig:Tabler:Card status="danger" statusPosition="start" title="db-1" text="Unreachable since 09:42." /> </div></div><div class="row row-cards"> <div class="col-sm-4"> <div class="card"> <div class="card-status-top bg-success"></div> <div class="card-header"><h3 class="card-title">api-1</h3></div> <div class="card-body">Healthy, 99.98% uptime.</div> </div> </div> <div class="col-sm-4"> <div class="card"> <div class="card-status-bottom bg-warning"></div> <div class="card-header"><h3 class="card-title">api-2</h3></div> <div class="card-body">High latency: 820 ms.</div> </div> </div> <div class="col-sm-4"> <div class="card"> <div class="card-status-start bg-danger"></div> <div class="card-header"><h3 class="card-title">db-1</h3></div> <div class="card-body">Unreachable since 09:42.</div> </div> </div></div>The border is rendered outside the content block, so a composed card keeps it:
<twig:Tabler:Card status="danger" statusPosition="start"> <twig:Tabler:Card:Header> <twig:Tabler:Card:Title>Danger zone</twig:Tabler:Card:Title> <twig:Tabler:Card:Actions> <twig:Tabler:Button variant="danger" size="sm">Delete project</twig:Tabler:Button> </twig:Tabler:Card:Actions> </twig:Tabler:Card:Header> <twig:Tabler:Card:Body>Deleting the project removes its deployments. This cannot be undone.</twig:Tabler:Card:Body></twig:Tabler:Card><div class="card"> <div class="card-status-start bg-danger"></div> <div class="card-header"> <h3 class="card-title">Danger zone</h3> <div class="card-actions"><button type="button" class="btn btn-sm btn-danger">Delete project</button></div> </div> <div class="card-body">Deleting the project removes its deployments. This cannot be undone.</div></div>Card:Status renders the same border on its own, for a card that does not use the status prop.
Gradients
Section titled “Gradients”gradient tints the card with a gradient background (card-gradient). It takes one of the presets: disco gold
love mellow ocean psychedelic rainbow snow sun.
<div class="row row-cards"> {% for preset in ['disco', 'gold', 'love', 'mellow', 'ocean', 'psychedelic', 'rainbow', 'snow', 'sun'] %} <div class="col-sm-4"> <twig:Tabler:Card gradient="{{ preset }}" title="{{ preset|capitalize }}" text="The {{ preset }} preset." /> </div> {% endfor %}</div><div class="row row-cards"> <div class="col-sm-4"> <div class="card card-gradient card-gradient-disco"> <div class="card-header"><h3 class="card-title">Disco</h3></div> <div class="card-body">The disco preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-gold"> <div class="card-header"><h3 class="card-title">Gold</h3></div> <div class="card-body">The gold preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-love"> <div class="card-header"><h3 class="card-title">Love</h3></div> <div class="card-body">The love preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-mellow"> <div class="card-header"><h3 class="card-title">Mellow</h3></div> <div class="card-body">The mellow preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-ocean"> <div class="card-header"><h3 class="card-title">Ocean</h3></div> <div class="card-body">The ocean preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-psychedelic"> <div class="card-header"><h3 class="card-title">Psychedelic</h3></div> <div class="card-body">The psychedelic preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-rainbow"> <div class="card-header"><h3 class="card-title">Rainbow</h3></div> <div class="card-body">The rainbow preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-snow"> <div class="card-header"><h3 class="card-title">Snow</h3></div> <div class="card-body">The snow preset.</div> </div> </div> <div class="col-sm-4"> <div class="card card-gradient card-gradient-sun"> <div class="card-header"><h3 class="card-title">Sun</h3></div> <div class="card-body">The sun preset.</div> </div> </div></div>It also takes a color (primary secondary success danger warning info dark light), or true (a bare
gradient attribute) for the default gradient. gradientDirection sets the edge the gradient starts from (start,
end or bottom), and gradientAnimated slowly shifts it:
<div class="row row-cards"> <div class="col-sm-6"> <twig:Tabler:Card gradient="{{ true }}" title="Default" text="A bare gradient uses the primary color." /> </div> <div class="col-sm-6"> <twig:Tabler:Card gradient="success" title="Color" text="Any semantic color: success, danger, info…" /> </div> <div class="col-sm-6"> <twig:Tabler:Card gradient="info" gradientDirection="bottom" title="Direction" text="The gradient starts from the bottom edge." /> </div> <div class="col-sm-6"> <twig:Tabler:Card gradient="ocean" gradientDirection="start" gradientAnimated="{{ true }}" title="Animated" text="The gradient slowly shifts." /> </div></div><div class="row row-cards"> <div class="col-sm-6"> <div class="card card-gradient"> <div class="card-header"><h3 class="card-title">Default</h3></div> <div class="card-body">A bare gradient uses the primary color.</div> </div> </div> <div class="col-sm-6"> <div class="card card-gradient card-gradient-success"> <div class="card-header"><h3 class="card-title">Color</h3></div> <div class="card-body">Any semantic color: success, danger, info…</div> </div> </div> <div class="col-sm-6"> <div class="card card-gradient card-gradient-info card-gradient-bottom"> <div class="card-header"><h3 class="card-title">Direction</h3></div> <div class="card-body">The gradient starts from the bottom edge.</div> </div> </div> <div class="col-sm-6"> <div class="card card-gradient card-gradient-ocean card-gradient-start card-gradient-animated"> <div class="card-header"><h3 class="card-title">Animated</h3></div> <div class="card-body">The gradient slowly shifts.</div> </div> </div></div>Dashed
Section titled “Dashed”dashed draws a dashed border, for an empty slot or an “add” placeholder:
<twig:Tabler:Card dashed="{{ true }}"> <twig:Tabler:Card:Body class="text-center text-secondary"> <twig:Tabler:Icon name="plus" /> Add a server </twig:Tabler:Card:Body></twig:Tabler:Card><div class="card card-dashed"> <div class="card-body text-center text-secondary"> <i class="ti ti-plus"></i> Add a server </div></div>Appearance
Section titled “Appearance”borderless removes the borders of the card, its header and its footer (card-borderless). transparent removes the
background and the shadow and keeps a dashed border (card-transparent). stacked draws a second card behind this one
(card-stacked). active marks the card as selected with a primary border (card-active), and inactive dims its
body and disables pointer events (card-inactive). rotate tilts the card: start or left to one side, end or
right to the other (card-rotate-*).
<div class="row row-cards"> <div class="col-sm-4"> <twig:Tabler:Card borderless="{{ true }}" title="Borderless" text="No border around the card." /> </div> <div class="col-sm-4"> <twig:Tabler:Card transparent="{{ true }}" title="Transparent" text="No background, a dashed border." /> </div> <div class="col-sm-4"> <twig:Tabler:Card stacked="{{ true }}" title="Stacked" text="A second card behind this one." /> </div> <div class="col-sm-4"> <twig:Tabler:Card active="{{ true }}" title="Active" text="The selected plan." /> </div> <div class="col-sm-4"> <twig:Tabler:Card inactive="{{ true }}" title="Inactive" text="Not available on your plan." /> </div> <div class="col-sm-4"> <twig:Tabler:Card rotate="start" title="Rotated" text="Tilted to the start." /> </div></div><div class="row row-cards"> <div class="col-sm-4"> <div class="card card-borderless"> <div class="card-header"><h3 class="card-title">Borderless</h3></div> <div class="card-body">No border around the card.</div> </div> </div> <div class="col-sm-4"> <div class="card card-transparent"> <div class="card-header"><h3 class="card-title">Transparent</h3></div> <div class="card-body">No background, a dashed border.</div> </div> </div> <div class="col-sm-4"> <div class="card card-stacked"> <div class="card-header"><h3 class="card-title">Stacked</h3></div> <div class="card-body">A second card behind this one.</div> </div> </div> <div class="col-sm-4"> <div class="card card-active"> <div class="card-header"><h3 class="card-title">Active</h3></div> <div class="card-body">The selected plan.</div> </div> </div> <div class="col-sm-4"> <div class="card card-inactive"> <div class="card-header"><h3 class="card-title">Inactive</h3></div> <div class="card-body">Not available on your plan.</div> </div> </div> <div class="col-sm-4"> <div class="card card-rotate-start"> <div class="card-header"><h3 class="card-title">Rotated</h3></div> <div class="card-body">Tilted to the start.</div> </div> </div></div>size sets the padding: sm, md (the default) or lg.
<div class="row row-cards"> {% for size in ['sm', 'md', 'lg'] %} <div class="col-sm-4"> <twig:Tabler:Card size="{{ size }}" title="Size {{ size }}" text="Padding follows the size." /> </div> {% endfor %}</div><div class="row row-cards"> <div class="col-sm-4"> <div class="card card-sm"> <div class="card-header"><h3 class="card-title">Size sm</h3></div> <div class="card-body">Padding follows the size.</div> </div> </div> <div class="col-sm-4"> <div class="card"> <div class="card-header"><h3 class="card-title">Size md</h3></div> <div class="card-body">Padding follows the size.</div> </div> </div> <div class="col-sm-4"> <div class="card card-lg"> <div class="card-header"><h3 class="card-title">Size lg</h3></div> <div class="card-body">Padding follows the size.</div> </div> </div></div>With href, the card renders as an <a>, so the whole card is clickable. link adds a hover effect: true (a bare
link attribute) for a hover shadow (card-link), pop to lift the card (card-link-pop) or rotate to tilt it
(card-link-rotate):
<div class="row row-cards"> <div class="col-sm-4"> <twig:Tabler:Card href="/deployments/1842" link="{{ true }}" title="Deployment #1842" text="main, deployed 2 hours ago." /> </div> <div class="col-sm-4"> <twig:Tabler:Card href="/deployments/1841" link="pop" title="Deployment #1841" text="main, deployed yesterday." /> </div> <div class="col-sm-4"> <twig:Tabler:Card href="/deployments/1840" link="rotate" title="Deployment #1840" text="main, deployed 3 days ago." /> </div></div><div class="row row-cards"> <div class="col-sm-4"> <a class="card card-link" href="/deployments/1842"> <div class="card-header"><h3 class="card-title">Deployment #1842</h3></div> <div class="card-body">main, deployed 2 hours ago.</div> </a> </div> <div class="col-sm-4"> <a class="card card-link card-link-pop" href="/deployments/1841"> <div class="card-header"><h3 class="card-title">Deployment #1841</h3></div> <div class="card-body">main, deployed yesterday.</div> </a> </div> <div class="col-sm-4"> <a class="card card-link card-link-rotate" href="/deployments/1840"> <div class="card-header"><h3 class="card-title">Deployment #1840</h3></div> <div class="card-body">main, deployed 3 days ago.</div> </a> </div></div>Images
Section titled “Images”Card:Img renders an image on an edge of the card. position sets the edge whose corners are rounded: top (the
default), bottom, start or end, or full for every corner (card-img). Put it first in the card for top, last
for bottom. alt defaults to an empty string, for a decorative image.
<div class="row row-cards"> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Img src="/examples/photo-1.jpg" alt="Open-plan office with desks" /> <twig:Tabler:Card:Body> <twig:Tabler:Card:Title>Paris office</twig:Tabler:Card:Title> <p class="text-secondary mb-0">12 desks, 3 meeting rooms.</p> </twig:Tabler:Card:Body> </twig:Tabler:Card> </div> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Body> <twig:Tabler:Card:Title>Lyon office</twig:Tabler:Card:Title> <p class="text-secondary mb-0">8 desks, 2 meeting rooms.</p> </twig:Tabler:Card:Body> <twig:Tabler:Card:Img src="/examples/photo-2.jpg" alt="Meeting room" position="bottom" /> </twig:Tabler:Card> </div></div><div class="row row-cards"> <div class="col-sm-6"> <div class="card"> <img src="/examples/photo-1.jpg" alt="Open-plan office with desks" class="card-img-top" /> <div class="card-body"> <h3 class="card-title">Paris office</h3> <p class="text-secondary mb-0">12 desks, 3 meeting rooms.</p> </div> </div> </div> <div class="col-sm-6"> <div class="card"> <div class="card-body"> <h3 class="card-title">Lyon office</h3> <p class="text-secondary mb-0">8 desks, 2 meeting rooms.</p> </div> <img src="/examples/photo-2.jpg" alt="Meeting room" class="card-img-bottom" /> </div> </div></div>Image overlay
Section titled “Image overlay”Card:ImgOverlay lays content over a Card:Img with position="full" (card-img-overlay). dark adds a gradient
that darkens the bottom of the image, so white text stays readable (card-img-overlay-dark):
<div class="row row-cards"> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Img src="/examples/photo-3.jpg" position="full" /> <twig:Tabler:Card:ImgOverlay dark="{{ true }}" class="d-flex flex-column justify-content-end"> <h3 class="card-title text-white mb-1">Working from home</h3> <p class="text-white mb-0">Six tips for a desk that lasts.</p> </twig:Tabler:Card:ImgOverlay> </twig:Tabler:Card> </div></div><div class="row row-cards"> <div class="col-sm-6"> <div class="card"> <img src="/examples/photo-3.jpg" alt="" class="card-img" /> <div class="card-img-overlay card-img-overlay-dark d-flex flex-column justify-content-end"> <h3 class="card-title text-white mb-1">Working from home</h3> <p class="text-white mb-0">Six tips for a desk that lasts.</p> </div> </div> </div></div>Card:Cover is a header with a background photo under a dark overlay (card-cover). image sets the photo, and
blurred blurs it (card-cover-blurred). The content is wrapped in a <div class="position-relative">, which keeps it
above the overlay. Put text-white on the text itself, since headings set their own color:
<div class="row row-cards"> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Cover image="/examples/photo-1.jpg" class="text-center py-4"> <div class="h2 m-0 text-white">Paris office</div> </twig:Tabler:Card:Cover> <twig:Tabler:Card:Body>12 desks, 3 meeting rooms.</twig:Tabler:Card:Body> </twig:Tabler:Card> </div> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Cover image="/examples/photo-2.jpg" blurred="{{ true }}" class="text-center py-4"> <div class="h2 m-0 text-white">Lyon office</div> </twig:Tabler:Card:Cover> <twig:Tabler:Card:Body>8 desks, 2 meeting rooms.</twig:Tabler:Card:Body> </twig:Tabler:Card> </div></div><div class="row row-cards"> <div class="col-sm-6"> <div class="card"> <div class="card-cover text-center py-4" style="background-image: url(/examples/photo-1.jpg)"> <div class="position-relative"><div class="h2 m-0 text-white">Paris office</div></div> </div> <div class="card-body">12 desks, 3 meeting rooms.</div> </div> </div> <div class="col-sm-6"> <div class="card"> <div class="card-cover card-cover-blurred text-center py-4" style="background-image: url(/examples/photo-2.jpg)" > <div class="position-relative"><div class="h2 m-0 text-white">Lyon office</div></div> </div> <div class="card-body">8 desks, 2 meeting rooms.</div> </div> </div></div>An Avatar with cover overlaps the cover from the body below.
Code and tables
Section titled “Code and tables”Card:Code replaces the body for a code block, without the body padding (card-code). To run a
Table edge to edge in a card, set its card prop.
<twig:Tabler:Card> <twig:Tabler:Card:Header> <twig:Tabler:Card:Title>Installation</twig:Tabler:Card:Title> </twig:Tabler:Card:Header> <twig:Tabler:Card:Code> <pre><code>composer require silarhi/tabler-ux-components</code></pre> </twig:Tabler:Card:Code></twig:Tabler:Card><div class="card"> <div class="card-header"><h3 class="card-title">Installation</h3></div> <div class="card-code"> <pre><code>composer require silarhi/tabler-ux-components</code></pre> </div></div>Card:Tabs switches between several cards with a row of tabs above them (card-tabs). Put a
Tabs bar and a Tabs:Content in it, and give each Tabs:Pane the card class:
<twig:Tabler:Card:Tabs> <twig:Tabler:Tabs> <twig:Tabler:Tabs:Item target="card-tabs-overview" active="{{ true }}">Overview</twig:Tabler:Tabs:Item> <twig:Tabler:Tabs:Item target="card-tabs-activity">Activity</twig:Tabler:Tabs:Item> </twig:Tabler:Tabs> <twig:Tabler:Tabs:Content> <twig:Tabler:Tabs:Pane id="card-tabs-overview" class="card" active="{{ true }}"> <twig:Tabler:Card:Body> <twig:Tabler:Card:Title>Invoice INV-0142</twig:Tabler:Card:Title> <p class="mb-0">Acme Corp, €1,250.00, due on November 1.</p> </twig:Tabler:Card:Body> </twig:Tabler:Tabs:Pane> <twig:Tabler:Tabs:Pane id="card-tabs-activity" class="card"> <twig:Tabler:Card:Body>Sent on October 2, viewed on October 3.</twig:Tabler:Card:Body> </twig:Tabler:Tabs:Pane> </twig:Tabler:Tabs:Content></twig:Tabler:Card:Tabs><div class="card-tabs"> <ul class="nav nav-tabs" data-bs-toggle="tabs" role="tablist"> <li class="nav-item" role="presentation"> <a href="#card-tabs-overview" class="nav-link active" data-bs-toggle="tab">Overview</a> </li> <li class="nav-item" role="presentation"> <a href="#card-tabs-activity" class="nav-link" data-bs-toggle="tab">Activity</a> </li> </ul> <div class="tab-content"> <div class="tab-pane active show card" id="card-tabs-overview" role="tabpanel"> <div class="card-body"> <h3 class="card-title">Invoice INV-0142</h3> <p class="mb-0">Acme Corp, €1,250.00, due on November 1.</p> </div> </div> <div class="tab-pane card" id="card-tabs-activity" role="tabpanel"> <div class="card-body">Sent on October 2, viewed on October 3.</div> </div> </div></div>Card:Stamp adds a large decorative icon in the top end corner (card-stamp). Put it in the card, before the body.
variant colors the circle (a theme color or a palette color such as yellow), and size="lg" makes it bigger. It is
hidden from assistive technology:
<div class="row row-cards"> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Stamp icon="bell" variant="yellow" /> <twig:Tabler:Card:Body> <twig:Tabler:Card:Title>3 new alerts</twig:Tabler:Card:Title> <p class="text-secondary mb-0">api-2 has answered slowly since 09:42.</p> </twig:Tabler:Card:Body> </twig:Tabler:Card> </div> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Stamp icon="star" variant="primary" size="lg" /> <twig:Tabler:Card:Body> <twig:Tabler:Card:Title>Pro plan</twig:Tabler:Card:Title> <p class="text-secondary mb-0">Renews on November 1.</p> </twig:Tabler:Card:Body> </twig:Tabler:Card> </div></div><div class="row row-cards"> <div class="col-sm-6"> <div class="card"> <div class="card-stamp" aria-hidden="true"> <div class="card-stamp-icon bg-yellow"><i class="ti ti-bell"></i></div> </div> <div class="card-body"> <h3 class="card-title">3 new alerts</h3> <p class="text-secondary mb-0">api-2 has answered slowly since 09:42.</p> </div> </div> </div> <div class="col-sm-6"> <div class="card"> <div class="card-stamp card-stamp-lg" aria-hidden="true"> <div class="card-stamp-icon bg-primary"><i class="ti ti-star"></i></div> </div> <div class="card-body"> <h3 class="card-title">Pro plan</h3> <p class="text-secondary mb-0">Renews on November 1.</p> </div> </div> </div></div>Progress
Section titled “Progress”Card:Progress attaches a thin progress bar to the bottom edge of the card. Put it last in the card. label is read by
screen readers, and defaults to the percentage. Card:Meta renders a muted secondary line:
<div class="row row-cards"> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Body> <twig:Tabler:Card:Title>Storage</twig:Tabler:Card:Title> <twig:Tabler:Card:Meta>94 GB of 100 GB used</twig:Tabler:Card:Meta> </twig:Tabler:Card:Body> <twig:Tabler:Card:Progress value="94" variant="danger" label="94% of the storage used" /> </twig:Tabler:Card> </div></div><div class="row row-cards"> <div class="col-sm-6"> <div class="card"> <div class="card-body"> <h3 class="card-title">Storage</h3> <div class="card-meta">94 GB of 100 GB used</div> </div> <div class="progress card-progress"> <div class="progress-bar bg-danger" role="progressbar" style="width: 94%" aria-valuenow="94" aria-valuemin="0" aria-valuemax="100" aria-label="94% of the storage used" ></div> </div> </div> </div></div>Bottom buttons
Section titled “Bottom buttons”Card:Btn is a full-width action along the bottom edge of the card (card-btn): an <a> with href, a
<button type="button"> without. Wrap several of them in a <div class="d-flex"> to share the edge:
<div class="row row-cards"> <div class="col-sm-6"> <twig:Tabler:Card> <twig:Tabler:Card:Body class="text-center"> <twig:Tabler:Avatar size="xl" image="/examples/avatar-1.jpg" class="mb-3" /> <twig:Tabler:Card:Title class="mb-1">Jane Doe</twig:Tabler:Card:Title> <twig:Tabler:Card:Meta>Account manager</twig:Tabler:Card:Meta> </twig:Tabler:Card:Body> <div class="d-flex"> <twig:Tabler:Card:Btn href="mailto:jane@example.com">Email</twig:Tabler:Card:Btn> <twig:Tabler:Card:Btn href="/users/42">View profile</twig:Tabler:Card:Btn> </div> </twig:Tabler:Card> </div></div><div class="row row-cards"> <div class="col-sm-6"> <div class="card"> <div class="card-body text-center"> <span class="avatar avatar-xl mb-3" style="background-image: url(/examples/avatar-1.jpg)"></span> <h3 class="card-title mb-1">Jane Doe</h3> <div class="card-meta">Account manager</div> </div> <div class="d-flex"> <a href="mailto:jane@example.com" class="card-btn">Email</a> <a href="/users/42" class="card-btn">View profile</a> </div> </div> </div></div>Scrollable body
Section titled “Scrollable body”Card:Body takes scrollable, which scrolls the body instead of growing the card (card-body-scrollable). Give the
body a height or a max-height:
<twig:Tabler:Card> <twig:Tabler:Card:Header> <twig:Tabler:Card:Title>Activity</twig:Tabler:Card:Title> </twig:Tabler:Card:Header> <twig:Tabler:Card:Body scrollable="{{ true }}" style="max-height: 10rem"> {% for hour in 9..17 %} <p>{{ hour }}:00: invoice #2026-{{ 140 + hour }} sent to Acme Corp.</p> {% endfor %} </twig:Tabler:Card:Body></twig:Tabler:Card><div class="card"> <div class="card-header"><h3 class="card-title">Activity</h3></div> <div class="card-body card-body-scrollable" style="max-height: 10rem"> <p>9:00: invoice #2026-149 sent to Acme Corp.</p> <p>10:00: invoice #2026-150 sent to Acme Corp.</p> <p>11:00: invoice #2026-151 sent to Acme Corp.</p> <p>12:00: invoice #2026-152 sent to Acme Corp.</p> <p>13:00: invoice #2026-153 sent to Acme Corp.</p> <p>14:00: invoice #2026-154 sent to Acme Corp.</p> <p>15:00: invoice #2026-155 sent to Acme Corp.</p> <p>16:00: invoice #2026-156 sent to Acme Corp.</p> <p>17:00: invoice #2026-157 sent to Acme Corp.</p> </div></div>Blocks
Section titled “Blocks”title, text and footer each have a matching block. Override one, and the others keep rendering from their props:
<twig:Tabler:Card title="Revenue" text="$12,400 this month." footer="Updated today"> <twig:block name="header"> <twig:Tabler:Card:Header> <twig:Tabler:Card:Title>Revenue</twig:Tabler:Card:Title> <twig:Tabler:Card:Actions> <twig:Tabler:Badge variant="success" light="{{ true }}">+8%</twig:Tabler:Badge> </twig:Tabler:Card:Actions> </twig:Tabler:Card:Header> </twig:block></twig:Tabler:Card><div class="card"> <div class="card-header"> <h3 class="card-title">Revenue</h3> <div class="card-actions"><span class="badge bg-success-lt">+8%</span></div> </div> <div class="card-body">$12,400 this month.</div> <div class="card-footer">Updated today</div></div>Passing children replaces the content block, and so the three blocks. The status border is rendered before
content, so it is kept. See Composition for how blocks work.
| Prop | Type | Default | Description |
|---|---|---|---|
size |
string | 'md' |
sm md lg: the padding |
status |
string? | null |
Status border color, rendered with Card:Status: primary secondary success danger warning info dark light |
statusPosition |
string | 'top' |
top bottom start |
gradient |
bool|string | null |
Gradient background: true for the default, a color as for status, or a preset (see above) |
gradientDirection |
string? | null |
start end bottom: where the gradient starts |
gradientAnimated |
bool | false |
Slowly shifts the gradient (card-gradient-animated) |
dashed |
bool | false |
Dashed border (card-dashed) |
borderless |
bool | false |
No border on the card, its header and its footer (card-borderless) |
transparent |
bool | false |
No background and no shadow, a dashed border (card-transparent) |
stacked |
bool | false |
Draws a second card behind this one (card-stacked) |
active |
bool | false |
Marks the card as selected (card-active) |
inactive |
bool | false |
Dims the body and disables pointer events (card-inactive) |
rotate |
string? | null |
start end left right: tilts the card (card-rotate-*) |
link |
bool|string | false |
Hover effect for a link card: true (card-link), pop (card-link-pop) or rotate (card-link-rotate) |
title |
string? | null |
Rendered with Card:Header and Card:Title |
text |
string? | null |
Rendered with Card:Body |
footer |
string? | null |
Rendered with Card:Footer |
href |
string? | null |
Renders an <a href> instead of a <div> |
Other attributes go to the root <div class="card"> (or <a>).
Sub-components
Section titled “Sub-components”| Component | Renders |
|---|---|
Card:Header |
<div class="card-header"> |
Card:Title |
<h3 class="card-title"> |
Card:Subtitle |
<div class="card-subtitle">: small muted text under the title |
Card:Actions |
<div class="card-actions">: buttons or links at the end of the header |
Card:Body |
<div class="card-body"> |
Card:Footer |
<div class="card-footer"> |
Card:Status |
<div class="card-status-top bg-primary">: the status border, see its props below |
Card:Img |
<img class="card-img-top">: an image on an edge of the card |
Card:ImgOverlay |
<div class="card-img-overlay">: content over a full Card:Img |
Card:Cover |
<div class="card-cover">: a header with a background photo |
Card:Code |
<div class="card-code">: a code block without the body padding |
Card:Tabs |
<div class="card-tabs">: cards switched by a row of tabs |
Card:Stamp |
<div class="card-stamp">: a large icon in the top end corner |
Card:Progress |
<div class="progress card-progress">: a progress bar on the bottom edge |
Card:Meta |
<div class="card-meta">: a muted secondary line |
Card:Btn |
<a class="card-btn"> (or <button>): a full-width action on the bottom edge |
Card:Status takes variant (default 'primary') and position (default 'top'), with the same values as the
status and statusPosition props of the card.
Card:Body:
| Prop | Type | Default | Description |
|---|---|---|---|
scrollable |
bool | false |
Scrolls the body instead of growing the card (card-body-scrollable) |
Card:Img:
| Prop | Type | Default | Description |
|---|---|---|---|
src |
string | Image URL (required) | |
alt |
string | '' |
Alternative text; empty for a decorative image |
position |
string | 'top' |
top bottom start end (card-img-{position}): the edge whose corners are rounded; full for every corner (card-img) |
Card:ImgOverlay:
| Prop | Type | Default | Description |
|---|---|---|---|
dark |
bool | false |
Gradient that keeps light text readable (card-img-overlay-dark) |
Card:Cover:
| Prop | Type | Default | Description |
|---|---|---|---|
image |
string? | null |
Photo URL, set as an inline background-image style |
blurred |
bool | false |
Blurs the photo behind the overlay (card-cover-blurred) |
Other attributes go to the <div class="card-cover">. A style attribute is merged after the background-image.
Card:Stamp:
| Prop | Type | Default | Description |
|---|---|---|---|
icon |
string? | null |
Tabler icon name; or put any markup in the content block |
variant |
string? | null |
Circle color (bg-{variant}): a theme color, or blue azure indigo purple pink red orange yellow lime green teal cyan |
size |
string | 'md' |
md lg (card-stamp-lg) |
Card:Progress:
| Prop | Type | Default | Description |
|---|---|---|---|
value |
int | 0 |
Percentage, from 0 to 100 |
variant |
string | 'primary' |
Bar color, as for Progress:Bar |
label |
string? | null |
aria-label of the bar; defaults to the percentage, e.g. 94% |
Card:Btn:
| Prop | Type | Default | Description |
|---|---|---|---|
href |
string? | null |
Renders an <a href>; without it, a <button type="button"> |
Blocks
Section titled “Blocks”| Block | Default |
|---|---|
header |
Card:Header with a Card:Title holding the title prop, when set |
body |
Card:Body with the text prop, when set |
footer |
Card:Footer with the footer prop, when set |
content |
header, body and footer: replace it to compose freely |
The status border (when status is set) is rendered before the content block, so replacing content keeps it.
Card:Stamp has a content block holding the icon. The other sub-components, except Card:Status, Card:Img and
Card:Progress, have an empty content block for their children.
