logo-icon
STW UI

Card

Cards are used to group and display content in a way that is easily readable.

Usage

svelte
import { Card } from 'stwui';
// OR
import Card from 'stwui/card'; // for tree shaking

All Parts

Card Header
cover
Card Content

With Cover

cover

With Cover and Overlay

cover

Europe Street beat

www.instagram.com

With Cover and Content

cover

Europe Street beat

www.instagram.com

Bordered Prop

I borddered!
I don't have a border!

Hoverable Prop

I am hoverable!
I am not hoverable!

Elevation

elevation="none"
elevation="sm"
elevation="md"
elevation="lg"
elevation="xl"

Card Props

divided boolean true
bordered boolean true
hoverable boolean false
elevation 'none' | 'sm' | 'md' | 'lg' | 'xl' md

Card Slots

header <Card.Header slot="header" />
cover <Card.Cover slot="cover" />
content <Card.Content slot="content" />
default
footer <Card.Footer slot="footer" />
actions <Card.Actions slot="actions" />

Card.Header Slots

default
extra

Card.Cover Slots

default
default <Card.Cover.Overlay />

Card.Content Slots

default

Card.Footer Slots

default

Card.Actions Slots

default <Card.Actions.Action />

Card.Actions.Action Slots

icon <Card.Actions.Action.Icon slot="icon" />
label <Card.Actions.Action.Label slot="label" />

Card.Actions.Action.Icon Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

Card.Actions.Action.Label Slots

default

Card Class Identifiers

stwui-card
stwui-card-content
stwui-card-cover
stwui-card-actions
stwui-card-actions-action
stwui-card-actions-action-label
stwui-card-footer
stwui-card-header
stwui-card-cover-overlay