Skip to content

Card ​

A flexible content card with two design lines:

Card

Design lines ​

// 01HERDRATE

Dashboard

Real-time metrics and system health overview.

Vue.jsTypeScriptTailwind
vue
1<Tabs defaultValue="tuix">2  <TabsList>3    <Tab value="tuix">TUIX</Tab>4    <Tab value="rubik">Rubik</Tab>5  </TabsList>6  <TabPanel value="tuix">7    <Card8      number="// 01"9      category="HERDRATE"10      title="Dashboard"11      description="Real-time metrics and system health overview."12      :tags="['Vue.js', 'TypeScript', 'Tailwind']"13      design="tuix"14    />15  </TabPanel>16  <TabPanel value="rubik">17    <Card18      number="// 01"19      category="HERDRATE"20      title="Dashboard"21      description="Real-time metrics and system health overview."22      :tags="['Vue.js', 'TypeScript', 'Tailwind']"23      design="rubik"24    />25  </TabPanel>26</Tabs>

Demo ​

Title & header ​

How the card head is filled: the title prop plus the title and header slots.

Title (title) ​

Plain-text heading of the card.

User Profile

Manage your account settings and preferences.

vue
1<Card title="User Profile" description="Manage your account settings and preferences." />

Rich title (title slot) ​

Replaces the heading text with rich markup.

Custom Title

This card uses a custom title slot.

vue
1<Card description="This card uses a custom title slot.">2  <template #title>3    <strong>Custom</strong> <span style="color:var(--primary)">Title</span>4  </template>5</Card>

Header (header slot) ​

Extra header content (e.g. status badges).

● Live

Server Status

All systems operational.

vue
1<Card title="Server Status" description="All systems operational.">2  <template #header>3    <span style="color:var(--success)">●</span> Live4  </template>5</Card>

Header (header) ​

Plain-text header content via the header prop. The slot wins if both are provided.

● Live

Server Status

All systems operational.

vue
1<Card title="Server Status" description="All systems operational." header="● Live" />

Metadata ​

Small labels that identify the card: index, category and tech tags.

Number (number) ​

Monospace index rendered in the card head (e.g. // 03).

// 03

Settings

Configure application behavior.

vue
1<Card number="// 03" title="Settings" description="Configure application behavior." />

Category (category) ​

Uppercase category label, shown next to the index.

API

Endpoints

REST and GraphQL endpoints documentation.

vue
1<Card category="API" title="Endpoints" description="REST and GraphQL endpoints documentation." />

Tags (tags) ​

Chip list of tech tags, rendered below the description.

Project Alpha

Multi-tenant SaaS platform with real-time collaboration.

Vue 3PiniaPostgreSQLDocker
vue
1<Card2  title="Project Alpha"3  description="Multi-tenant SaaS platform with real-time collaboration."4  :tags="['Vue 3', 'Pinia', 'PostgreSQL', 'Docker']"5/>

Rich content (default slot) ​

Override the description with rich content.

Rich Content

This description supports HTML and Vue components.

  • Item one
  • Item two
  • Item three

vue
1<Card title="Rich Content">2  <p>This description supports <strong>HTML</strong> and <em>Vue components</em>.</p>3  <ul>4    <li>Item one</li>5    <li>Item two</li>6    <li>Item three</li>7  </ul>8</Card>

Design line (design) ​

The same card on both lines: tuix (flat, sharp) and rubik (cut corner, soft elevation).

TUIX card

Sharp corners, monospace, flat surfaces.

Rubik card

Cut corners, ink bars, HUD restraint.

vue
1<Card title="TUIX card" description="Sharp corners, monospace, flat surfaces." design="tuix" />2<Card title="Rubik card" description="Cut corners, ink bars, HUD restraint." design="rubik" />

Appearance ​

Boolean flags that change how the card surface looks.

Border (border) ​

Outline around the card (on by default).

With border

Border is visible by default.

No border

Clean card without outline.

vue
1<Card title="With border" description="Border is visible by default." border />2<Card title="No border" description="Clean card without outline." :border="false" />

Shadow (shadow) ​

shadow applies var(--shadow). tuix defines --shadow: none (flat line), so the prop is only visible on rubik. Both cards below are pinned to rubik — the only difference between them is the shadow.

With shadow

Explicit shadow prop.

No shadow

Default (shadow=false).

vue
1<Card title="With shadow" description="Explicit shadow prop." design="rubik" shadow />2<Card title="No shadow" description="Default (shadow=false)." design="rubik" :shadow="false" />

Arrow (arrow) ​

Arrow affordance on the right edge (on by default).

With arrow

Arrow indicator is shown by default.

No arrow

Clean right edge.

vue
1<Card title="With arrow" description="Arrow indicator is shown by default." arrow />2<Card title="No arrow" description="Clean right edge." :arrow="false" />

Extra footer content (e.g. action buttons).

Confirm Action

Are you sure you want to proceed?

vue
1<script setup>2import { Button } from '@dowardev/herdrate-vue'3</script>45<Card title="Confirm Action" description="Are you sure you want to proceed?">6  <template #footer>7    <Button color="danger" fill="outline" @click="() => {}">Cancel</Button>8    <Button color="primary" @click="() => {}">Confirm</Button>9  </template>10</Card>

Plain-text footer content via the footer prop. The slot wins if both are provided.

Last commit

Adds the new prop and updates the docs.

updated 2m ago
vue
1<Card title="Last commit" description="Adds the new prop and updates the docs." footer="updated 2m ago" />

Hover event (hover) ​

Emitted when the pointer enters the card (mouseenter). Consumer decides what to do (e.g. show the border).

vue
1<Card2  title="Hover me"3  description="Open the browser console to see the hover event."4  :border="false"5  @hover="() => console.log('Card hovered!')"6/>

Props ​

title ​

Card title (required).

TypeDefaultRequired
string—✅

description ​

Plain-text body content. Overridden by the default slot if provided.

TypeDefaultRequired
string—❌

Plain-text header content shown before the title. Overridden by the header slot if provided.

TypeDefaultRequired
string—❌

Plain-text footer content shown at the bottom. Overridden by the footer slot if provided.

TypeDefaultRequired
string—❌

number ​

Monospace index (e.g. // 03).

TypeDefaultRequired
string—❌

category ​

Uppercase label for categorization.

TypeDefaultRequired
string—❌

tags ​

Tech chips displayed below the description.

TypeDefaultRequired
string[]—❌

design ​

The design line: tuix (sharp corners, flat) or rubik (cut corners, HUD restraint).

TypeDefaultRequired
'tuix' | 'rubik'inherit❌

border ​

Show or hide the border outline.

TypeDefaultRequired
booleantrue❌

shadow ​

Elevation shadow — flat (none) on tuix, floating on rubik.

TypeDefaultRequired
booleanfalse❌

arrow ​

Show the arrow affordance on the right side.

TypeDefaultRequired
booleantrue❌

Slots ​

SlotDescription
headerExtra header content
titleOverride the title
defaultOverride the description
footerExtra footer content

Events ​

EventPayloadDescription
hovervoidEmitted on pointer enter (mouseenter); consumer drives hover behavior

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--accentfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Accent color, mapped from the active semantic color.
--bgfrom theme (--ctp-latte-base / --ctp-mocha-base)Base background of the surface.
--bg-altfrom theme (--ctp-latte-mantle / --ctp-mocha-mantle)Alternate background (the next layer down from the base).
--borderfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Outline and divider color for surfaces.
--textfrom theme (--ctp-latte-text / --ctp-mocha-text)Primary text color used inside the component.
--text-mutedfrom theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1)Secondary text for hints, annotations and disabled state.
--cp-easecubic-bezier(.4, 0, .2, 1)Default easing curve for transitions.
--shadownone on TUIX, elevated on rubikElevation shadow for raised surfaces.
--shadow-hovervar(--shadow-hover, var(--shadow))Shadow on hover/active state.

Ver Theming para la convención completa.