sigil/UI

Card

A composable card with header, content, and footer slots. Reads radius, shadow, and surface color from your token file.

Import

import {
  Card,
  CardHeader,
  CardTitle,
  CardDescription,
  CardContent,
  CardFooter,
} from "@sigil-ui/components";

Preview

Usage

<Card>
  <CardHeader>
    <CardTitle>Card title</CardTitle>
    <CardDescription>Supporting description.</CardDescription>
  </CardHeader>
  <CardContent>
    <p>Card body content goes here.</p>
  </CardContent>
  <CardFooter>
    <Button variant="primary">Action</Button>
  </CardFooter>
</Card>

Hoverable

Add hoverable to enable a lift effect on hover.

<Card hoverable>
  <CardContent>Hover me for an elevation shift.</CardContent>
</Card>

Composable slots

Cards are built from composable sub-components. Use only the slots you need:

{/* Content only */}
<Card>
  <CardContent>Content only — no header or footer.</CardContent>
</Card>

{/* Header + content */}
<Card>
  <CardHeader>
    <CardTitle>Title only</CardTitle>
  </CardHeader>
  <CardContent>Body text here.</CardContent>
</Card>

Token integration

CSS VariableUsed for
--s-surfaceCard background
--s-surface-elevatedHover state background
--s-textCard text color
--s-text-mutedDescription text color
--s-borderCard border color
--s-border-styleBorder style (solid, dashed, etc.)
--s-radius-cardBorder radius
--s-shadow-smDefault elevation
--s-shadow-mdHover state elevation
--s-duration-normalHover transition duration

Props

Card

PropTypeDefaultDescription
hoverablebooleanfalseEnable hover lift effect
classNamestringAdditional CSS classes
childrenReactNodeCard content

CardHeader

PropTypeDefaultDescription
classNamestringAdditional CSS classes
childrenReactNodeHeader content (use with CardTitle, CardDescription)

CardTitle

PropTypeDefaultDescription
classNamestringAdditional CSS classes
childrenReactNodeTitle text

CardDescription

PropTypeDefaultDescription
classNamestringAdditional CSS classes
childrenReactNodeDescription text

CardContent

PropTypeDefaultDescription
classNamestringAdditional CSS classes
childrenReactNodeBody content

CardFooter

PropTypeDefaultDescription
classNamestringAdditional CSS classes
childrenReactNodeFooter content

Accessibility

  • Renders as a <div> by default with no implicit role
  • For interactive cards, wrap content in a semantic element like <a> or <button>
  • Focus ring uses --s-ring for keyboard navigation
Studiodefault
Presets
primary
secondary
background
surface
text
border
accent
success
warning
error
info
display
body
mono
heading wt
600
heading trk
-0.025em
base size
16px
page margin
24px
section pad
64px
card pad
24px
grid gap
24px
stack gap
12px
global
8px
button
8px
card
12px
input
6px
border w
1px
style
card border
card shadow
btn shadow
glow
spring
Type
Duration
0.20
Bounce
1.00
easing
cubic-bezier(0.16, 1, 0.3, 1)
fast
150ms
normal
200ms
slow
300ms
hover scale
1.02
press scale
0.98
hover lift
-1px
stagger
50ms
weight
transform
hover
active scale
0.98
min-width
0px
letter sp
0.000em
icon gap
8px
shadow
hover
border
shadow
padding
24px
title size
1px
title wt
desc size
0.875px
aspect
outline
height
36px
focus ring
2px
focus ring
h1 size
2.25px
h2 size
1.875px
h3 size
1.5px
h4 size
1.25px
weight
tracking
-0.020em
leading
1.20
pattern
pattern α
0.03
noise
gradient
grad angle
180°
height
50px
blur
12px
border
padding
24px
item gap
24px
min-height
600px
padding Y
80px
content-max
680px
layout
title size
56px
desc size
18px
padding Y
64px
max-width
600px
layout
title size
36px
padding Y
48px
columns
4
gap
36px
content-max
1200px
rail-gap
24px
grid-cell
50px
cross-stroke
1.5px
navbar-h
50px
bento-gap
16px
grid lines
dots
cell borders
cell bg
Gutter
Margin
content
hero
navbar
rail visible
enabled