Docs Components Core

Card

React example follows below.
ts
/**
* One entry per configuration the Card spec draws (emphasis, size, structure,
* state, link). The demos in every framework render this same list, so the
* docs page shows the identical gallery whichever tab you are on.
*
* Slot content is a plain string, not a node: this package is framework-neutral
* and each adapter wraps it in its own markup.
*/
interface CardVariantFixture {
readonly id: string;
/** Caption above the specimen. */
readonly label: string;
readonly framed?: boolean;
readonly emphasis?: "outlined" | "elevated" | "filled" | "dashed";
readonly size?: "compact" | "default" | "spacious";
readonly orientation?: "vertical" | "horizontal";
readonly accent?: boolean;
/** Placeholder caption for the media slot. */
readonly media?: string;
readonly header?: string;
readonly footer?: string;
readonly interactive?: boolean;
readonly selected?: boolean;
readonly disabled?: boolean;
readonly loading?: boolean;
readonly href?: string;
}
const cardFixture = {
id: "card",
eyebrow: "Service status",
title: "ledger-api",
body: "All health checks are passing.",
framed: false,
variants: [
{ id: "outlined", label: "outlined — default" },
{ id: "framed", label: "framed", framed: true },
{ id: "elevated", label: "elevated", emphasis: "elevated" },
{ id: "filled", label: "filled", emphasis: "filled" },
{ id: "dashed", label: "dashed", emphasis: "dashed" },
{ id: "accent", label: "accent bar", accent: true },
{ id: "compact", label: "compact", size: "compact" },
{ id: "spacious", label: "spacious", size: "spacious" },
{ id: "header", label: "header", header: "eu-west-1" },
{ id: "footer", label: "footer", footer: "checked 30s ago" },
{ id: "media", label: "media top", media: "[ latency chart ]" },
{ id: "horizontal", label: "horizontal", orientation: "horizontal", media: "[ 1:1 ]" },
{ id: "interactive", label: "interactive — hover me", interactive: true },
{ id: "selected", label: "selected", interactive: true, selected: true },
{ id: "disabled", label: "disabled", interactive: true, disabled: true },
{ id: "loading", label: "loading", loading: true },
{ id: "link", label: "link — whole card", href: "#card-link" },
],
} satisfies {
id: string;
eyebrow: string;
title: string;
body: string;
framed: boolean;
variants: readonly CardVariantFixture[];
};
import { Card } from "@grassroot/ui-react";
const GRID = {
display: "grid",
gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))",
gap: "22px 18px",
alignItems: "start",
} as const;
const CELL = { display: "grid", gap: "8px", alignContent: "start" } as const;
const CAPTION = {
fontFamily: "var(--font-mono)",
fontSize: "11px",
letterSpacing: ".08em",
textTransform: "uppercase",
color: "var(--text-muted)",
} as const;
const MEDIA = {
display: "flex",
alignItems: "center",
justifyContent: "center",
minHeight: "86px",
height: "100%",
fontFamily: "var(--font-mono)",
fontSize: "10px",
color: "var(--text-muted)",
} as const;
export default function CardDemo() {
return (
<div style={GRID}>
{cardFixture.variants.map((variant) => (
<div key={variant.id} style={CELL}>
<span style={CAPTION}>{variant.label}</span>
<Card
eyebrow={variant.header || variant.media ? undefined : cardFixture.eyebrow}
title={cardFixture.title}
description={cardFixture.body}
framed={variant.framed}
emphasis={variant.emphasis}
size={variant.size}
orientation={variant.orientation}
accent={variant.accent}
interactive={variant.interactive}
selected={variant.selected}
disabled={variant.disabled}
loading={variant.loading}
href={variant.href}
media={variant.media ? <div style={MEDIA}>{variant.media}</div> : undefined}
header={variant.header}
footer={variant.footer}
/>
</div>
))}
</div>
);
}
ts
<script setup lang="ts">
/**
* One entry per configuration the Card spec draws (emphasis, size, structure,
* state, link). The demos in every framework render this same list, so the
* docs page shows the identical gallery whichever tab you are on.
*
* Slot content is a plain string, not a node: this package is framework-neutral
* and each adapter wraps it in its own markup.
*/
interface CardVariantFixture {
readonly id: string;
/** Caption above the specimen. */
readonly label: string;
readonly framed?: boolean;
readonly emphasis?: "outlined" | "elevated" | "filled" | "dashed";
readonly size?: "compact" | "default" | "spacious";
readonly orientation?: "vertical" | "horizontal";
readonly accent?: boolean;
/** Placeholder caption for the media slot. */
readonly media?: string;
readonly header?: string;
readonly footer?: string;
readonly interactive?: boolean;
readonly selected?: boolean;
readonly disabled?: boolean;
readonly loading?: boolean;
readonly href?: string;
}
const cardFixture = {
id: "card",
eyebrow: "Service status",
title: "ledger-api",
body: "All health checks are passing.",
framed: false,
variants: [
{ id: "outlined", label: "outlined — default" },
{ id: "framed", label: "framed", framed: true },
{ id: "elevated", label: "elevated", emphasis: "elevated" },
{ id: "filled", label: "filled", emphasis: "filled" },
{ id: "dashed", label: "dashed", emphasis: "dashed" },
{ id: "accent", label: "accent bar", accent: true },
{ id: "compact", label: "compact", size: "compact" },
{ id: "spacious", label: "spacious", size: "spacious" },
{ id: "header", label: "header", header: "eu-west-1" },
{ id: "footer", label: "footer", footer: "checked 30s ago" },
{ id: "media", label: "media top", media: "[ latency chart ]" },
{ id: "horizontal", label: "horizontal", orientation: "horizontal", media: "[ 1:1 ]" },
{ id: "interactive", label: "interactive — hover me", interactive: true },
{ id: "selected", label: "selected", interactive: true, selected: true },
{ id: "disabled", label: "disabled", interactive: true, disabled: true },
{ id: "loading", label: "loading", loading: true },
{ id: "link", label: "link — whole card", href: "#card-link" },
],
} satisfies {
id: string;
eyebrow: string;
title: string;
body: string;
framed: boolean;
variants: readonly CardVariantFixture[];
};
import { Card } from "@grassroot/ui-vue";
const GRID =
"display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:22px 18px;align-items:start";
const CELL = "display:grid;gap:8px;align-content:start";
const CAPTION =
"font-family:var(--font-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)";
const MEDIA =
"display:flex;align-items:center;justify-content:center;min-height:86px;height:100%;font-family:var(--font-mono);font-size:10px;color:var(--text-muted)";
</script>
<template>
<div :style="GRID">
<div v-for="variant in cardFixture.variants" :key="variant.id" :style="CELL">
<span :style="CAPTION">{{ variant.label }}</span>
<Card
:eyebrow="variant.header || variant.media ? undefined : cardFixture.eyebrow"
:title="cardFixture.title"
:description="cardFixture.body"
:framed="variant.framed"
:emphasis="variant.emphasis"
:size="variant.size"
:orientation="variant.orientation"
:accent="variant.accent"
:interactive="variant.interactive"
:selected="variant.selected"
:disabled="variant.disabled"
:loading="variant.loading"
:href="variant.href"
>
<template v-if="variant.media" #media
><div :style="MEDIA">{{ variant.media }}</div></template
>
<template v-if="variant.header" #header>{{ variant.header }}</template>
<template v-if="variant.footer" #footer>{{ variant.footer }}</template>
</Card>
</div>
</div>
</template>
ts
import { Component } from "@angular/core";
/**
* One entry per configuration the Card spec draws (emphasis, size, structure,
* state, link). The demos in every framework render this same list, so the
* docs page shows the identical gallery whichever tab you are on.
*
* Slot content is a plain string, not a node: this package is framework-neutral
* and each adapter wraps it in its own markup.
*/
interface CardVariantFixture {
readonly id: string;
/** Caption above the specimen. */
readonly label: string;
readonly framed?: boolean;
readonly emphasis?: "outlined" | "elevated" | "filled" | "dashed";
readonly size?: "compact" | "default" | "spacious";
readonly orientation?: "vertical" | "horizontal";
readonly accent?: boolean;
/** Placeholder caption for the media slot. */
readonly media?: string;
readonly header?: string;
readonly footer?: string;
readonly interactive?: boolean;
readonly selected?: boolean;
readonly disabled?: boolean;
readonly loading?: boolean;
readonly href?: string;
}
const cardFixture = {
id: "card",
eyebrow: "Service status",
title: "ledger-api",
body: "All health checks are passing.",
framed: false,
variants: [
{ id: "outlined", label: "outlined — default" },
{ id: "framed", label: "framed", framed: true },
{ id: "elevated", label: "elevated", emphasis: "elevated" },
{ id: "filled", label: "filled", emphasis: "filled" },
{ id: "dashed", label: "dashed", emphasis: "dashed" },
{ id: "accent", label: "accent bar", accent: true },
{ id: "compact", label: "compact", size: "compact" },
{ id: "spacious", label: "spacious", size: "spacious" },
{ id: "header", label: "header", header: "eu-west-1" },
{ id: "footer", label: "footer", footer: "checked 30s ago" },
{ id: "media", label: "media top", media: "[ latency chart ]" },
{ id: "horizontal", label: "horizontal", orientation: "horizontal", media: "[ 1:1 ]" },
{ id: "interactive", label: "interactive — hover me", interactive: true },
{ id: "selected", label: "selected", interactive: true, selected: true },
{ id: "disabled", label: "disabled", interactive: true, disabled: true },
{ id: "loading", label: "loading", loading: true },
{ id: "link", label: "link — whole card", href: "#card-link" },
],
} satisfies {
id: string;
eyebrow: string;
title: string;
body: string;
framed: boolean;
variants: readonly CardVariantFixture[];
};
import {
GrassrootCard,
GrassrootCardFooter,
GrassrootCardHeader,
GrassrootCardMedia,
} from "@grassroot/ui-angular";
@Component({
selector: "app-card-demo",
standalone: true,
imports: [GrassrootCard, GrassrootCardMedia, GrassrootCardHeader, GrassrootCardFooter],
template: `
<div
style="display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:22px 18px;align-items:start"
>
@for (variant of variants; track variant.id) {
<div style="display:grid;gap:8px;align-content:start">
<span
style="font-family:var(--font-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)"
>{{ variant.label }}</span
>
<grassroot-card
[eyebrow]="variant.header || variant.media ? undefined : fixture.eyebrow"
[title]="fixture.title"
[description]="fixture.body"
[framed]="!!variant.framed"
[emphasis]="variant.emphasis"
[size]="variant.size ?? 'default'"
[orientation]="variant.orientation"
[accent]="!!variant.accent"
[interactive]="variant.interactive"
[selected]="variant.selected"
[disabled]="variant.disabled"
[loading]="variant.loading"
>
@if (variant.media) {
<div
grassrootCardMedia
style="display:flex;align-items:center;justify-content:center;min-height:86px;height:100%;font-family:var(--font-mono);font-size:10px;color:var(--text-muted)"
>
{{ variant.media }}
</div>
}
@if (variant.header) {
<div grassrootCardHeader>{{ variant.header }}</div>
}
@if (variant.footer) {
<div grassrootCardFooter>{{ variant.footer }}</div>
}
</grassroot-card>
</div>
}
</div>
`,
})
export class CardDemoComponent {
protected readonly fixture = cardFixture;
/**
* The whole-card link has no `<grassroot-card>` form — a custom element
* cannot be an anchor (recorded in contracts/divergences.json). Angular
* consumers write `<a grCardRoot [href]="…">` with the same
* `cardRootClass({ interactive: true })`, so there is nothing for this
* gallery to render.
*/
protected readonly variants = cardFixture.variants.filter((variant) => !variant.href);
}
export default CardDemoComponent;
ts
<script lang="ts">
/**
* One entry per configuration the Card spec draws (emphasis, size, structure,
* state, link). The demos in every framework render this same list, so the
* docs page shows the identical gallery whichever tab you are on.
*
* Slot content is a plain string, not a node: this package is framework-neutral
* and each adapter wraps it in its own markup.
*/
interface CardVariantFixture {
readonly id: string;
/** Caption above the specimen. */
readonly label: string;
readonly framed?: boolean;
readonly emphasis?: "outlined" | "elevated" | "filled" | "dashed";
readonly size?: "compact" | "default" | "spacious";
readonly orientation?: "vertical" | "horizontal";
readonly accent?: boolean;
/** Placeholder caption for the media slot. */
readonly media?: string;
readonly header?: string;
readonly footer?: string;
readonly interactive?: boolean;
readonly selected?: boolean;
readonly disabled?: boolean;
readonly loading?: boolean;
readonly href?: string;
}
const cardFixture = {
id: "card",
eyebrow: "Service status",
title: "ledger-api",
body: "All health checks are passing.",
framed: false,
variants: [
{ id: "outlined", label: "outlined — default" },
{ id: "framed", label: "framed", framed: true },
{ id: "elevated", label: "elevated", emphasis: "elevated" },
{ id: "filled", label: "filled", emphasis: "filled" },
{ id: "dashed", label: "dashed", emphasis: "dashed" },
{ id: "accent", label: "accent bar", accent: true },
{ id: "compact", label: "compact", size: "compact" },
{ id: "spacious", label: "spacious", size: "spacious" },
{ id: "header", label: "header", header: "eu-west-1" },
{ id: "footer", label: "footer", footer: "checked 30s ago" },
{ id: "media", label: "media top", media: "[ latency chart ]" },
{ id: "horizontal", label: "horizontal", orientation: "horizontal", media: "[ 1:1 ]" },
{ id: "interactive", label: "interactive — hover me", interactive: true },
{ id: "selected", label: "selected", interactive: true, selected: true },
{ id: "disabled", label: "disabled", interactive: true, disabled: true },
{ id: "loading", label: "loading", loading: true },
{ id: "link", label: "link — whole card", href: "#card-link" },
],
} satisfies {
id: string;
eyebrow: string;
title: string;
body: string;
framed: boolean;
variants: readonly CardVariantFixture[];
};
import { Card } from "@grassroot/ui-svelte";
const GRID =
"display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:22px 18px;align-items:start";
const CELL = "display:grid;gap:8px;align-content:start";
const CAPTION =
"font-family:var(--font-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)";
const MEDIA =
"display:flex;align-items:center;justify-content:center;min-height:86px;height:100%;font-family:var(--font-mono);font-size:10px;color:var(--text-muted)";
</script>
<div style={GRID}>
{#each cardFixture.variants as variant (variant.id)}
{#snippet mediaSlot()}<div style={MEDIA}>{variant.media}</div>{/snippet}
{#snippet headerSlot()}{variant.header}{/snippet}
{#snippet footerSlot()}{variant.footer}{/snippet}
<div style={CELL}>
<span style={CAPTION}>{variant.label}</span>
<Card
eyebrow={variant.header || variant.media ? undefined : cardFixture.eyebrow}
title={cardFixture.title}
description={cardFixture.body}
framed={variant.framed}
emphasis={variant.emphasis}
size={variant.size}
orientation={variant.orientation}
accent={variant.accent}
interactive={variant.interactive}
selected={variant.selected}
disabled={variant.disabled}
loading={variant.loading}
href={variant.href}
media={variant.media ? mediaSlot : undefined}
header={variant.header ? headerSlot : undefined}
footer={variant.footer ? footerSlot : undefined}
/>
</div>
{/each}
</div>
ts
/** @jsxImportSource solid-js */
import { For } from "solid-js";
/**
* One entry per configuration the Card spec draws (emphasis, size, structure,
* state, link). The demos in every framework render this same list, so the
* docs page shows the identical gallery whichever tab you are on.
*
* Slot content is a plain string, not a node: this package is framework-neutral
* and each adapter wraps it in its own markup.
*/
interface CardVariantFixture {
readonly id: string;
/** Caption above the specimen. */
readonly label: string;
readonly framed?: boolean;
readonly emphasis?: "outlined" | "elevated" | "filled" | "dashed";
readonly size?: "compact" | "default" | "spacious";
readonly orientation?: "vertical" | "horizontal";
readonly accent?: boolean;
/** Placeholder caption for the media slot. */
readonly media?: string;
readonly header?: string;
readonly footer?: string;
readonly interactive?: boolean;
readonly selected?: boolean;
readonly disabled?: boolean;
readonly loading?: boolean;
readonly href?: string;
}
const cardFixture = {
id: "card",
eyebrow: "Service status",
title: "ledger-api",
body: "All health checks are passing.",
framed: false,
variants: [
{ id: "outlined", label: "outlined — default" },
{ id: "framed", label: "framed", framed: true },
{ id: "elevated", label: "elevated", emphasis: "elevated" },
{ id: "filled", label: "filled", emphasis: "filled" },
{ id: "dashed", label: "dashed", emphasis: "dashed" },
{ id: "accent", label: "accent bar", accent: true },
{ id: "compact", label: "compact", size: "compact" },
{ id: "spacious", label: "spacious", size: "spacious" },
{ id: "header", label: "header", header: "eu-west-1" },
{ id: "footer", label: "footer", footer: "checked 30s ago" },
{ id: "media", label: "media top", media: "[ latency chart ]" },
{ id: "horizontal", label: "horizontal", orientation: "horizontal", media: "[ 1:1 ]" },
{ id: "interactive", label: "interactive — hover me", interactive: true },
{ id: "selected", label: "selected", interactive: true, selected: true },
{ id: "disabled", label: "disabled", interactive: true, disabled: true },
{ id: "loading", label: "loading", loading: true },
{ id: "link", label: "link — whole card", href: "#card-link" },
],
} satisfies {
id: string;
eyebrow: string;
title: string;
body: string;
framed: boolean;
variants: readonly CardVariantFixture[];
};
import { Card } from "@grassroot/ui-solid";
const GRID =
"display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:22px 18px;align-items:start";
const CELL = "display:grid;gap:8px;align-content:start";
const CAPTION =
"font-family:var(--font-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)";
const MEDIA =
"display:flex;align-items:center;justify-content:center;min-height:86px;height:100%;font-family:var(--font-mono);font-size:10px;color:var(--text-muted)";
export default function CardDemo() {
return (
<div style={GRID}>
<For each={cardFixture.variants}>
{(variant) => (
<div style={CELL}>
<span style={CAPTION}>{variant.label}</span>
<Card
eyebrow={variant.header || variant.media ? undefined : cardFixture.eyebrow}
title={cardFixture.title}
description={cardFixture.body}
framed={variant.framed}
emphasis={variant.emphasis}
size={variant.size}
orientation={variant.orientation}
accent={variant.accent}
interactive={variant.interactive}
selected={variant.selected}
disabled={variant.disabled}
loading={variant.loading}
href={variant.href}
media={variant.media ? <div style={MEDIA}>{variant.media}</div> : undefined}
header={variant.header}
footer={variant.footer}
/>
</div>
)}
</For>
</div>
);
}

Installation

API Reference

Import

import { Card } from "@grassroot/ui-react";

Props

Prop
Type
Default
Requirement
Description
framed
boolean | undefined
false
optional
Ink 1.5px rule, no shadow — the brand "stamp".
emphasis
CardEmphasis | undefined
—
optional
—
size
CardSize | undefined
—
optional
—
orientation
CardOrientation | undefined
—
optional
—
footerActions
boolean | undefined
—
optional
Right-align the footer's contents, the way an action row wants.
accent
boolean | undefined
—
optional
A 3px accent rule across the top edge.
interactive
boolean | undefined
—
optional
Activatable surface: `role="button"`, tab stop, Enter/Space.
href
string | undefined
—
optional
Renders the whole card as a link.
selected
boolean | undefined
—
optional
—
disabled
boolean | undefined
—
optional
—
loading
boolean | undefined
—
optional
Replaces the body with skeleton lines and sets `aria-busy`.
onActivate
((detail: CardActivateEvent) => void) | undefined
—
optional
—
Prop
framed
Type
boolean | undefined
Default
false
Requirement
optional
Description
Ink 1.5px rule, no shadow — the brand "stamp".
Prop
emphasis
Type
CardEmphasis | undefined
Default
—
Requirement
optional
Description
—
Prop
size
Type
CardSize | undefined
Default
—
Requirement
optional
Description
—
Prop
orientation
Type
CardOrientation | undefined
Default
—
Requirement
optional
Description
—
Prop
footerActions
Type
boolean | undefined
Default
—
Requirement
optional
Description
Right-align the footer's contents, the way an action row wants.
Prop
accent
Type
boolean | undefined
Default
—
Requirement
optional
Description
A 3px accent rule across the top edge.
Prop
interactive
Type
boolean | undefined
Default
—
Requirement
optional
Description
Activatable surface: `role="button"`, tab stop, Enter/Space.
Prop
href
Type
string | undefined
Default
—
Requirement
optional
Description
Renders the whole card as a link.
Prop
selected
Type
boolean | undefined
Default
—
Requirement
optional
Description
—
Prop
disabled
Type
boolean | undefined
Default
—
Requirement
optional
Description
—
Prop
loading
Type
boolean | undefined
Default
—
Requirement
optional
Description
Replaces the body with skeleton lines and sets `aria-busy`.
Prop
onActivate
Type
((detail: CardActivateEvent) => void) | undefined
Default
—
Requirement
optional
Description
—

Events

EventPayload
onActivate((detail: CardActivateEvent) => void) | undefined

Content regions

  • children
  • description
  • eyebrow
  • footer
  • header
  • media
  • title

Native attributes

Standard DOM and ARIA attributes not listed above spread onto the root element.

Import

import { Card } from "@grassroot/ui-vue";

Props

Prop
Type
Default
Requirement
framed
boolean | undefined
false
optional
emphasis
CardEmphasis | undefined
—
optional
size
CardSize | undefined
"default"
optional
orientation
CardOrientation | undefined
—
optional
eyebrow
string | undefined
—
optional
title
string | undefined
—
optional
description
string | undefined
—
optional
footerActions
boolean | undefined
false
optional
accent
boolean | undefined
false
optional
interactive
boolean | undefined
—
optional
href
string | undefined
—
optional
selected
boolean | undefined
—
optional
disabled
boolean | undefined
—
optional
loading
boolean | undefined
—
optional
Prop
framed
Type
boolean | undefined
Default
false
Requirement
optional
Prop
emphasis
Type
CardEmphasis | undefined
Default
—
Requirement
optional
Prop
size
Type
CardSize | undefined
Default
"default"
Requirement
optional
Prop
orientation
Type
CardOrientation | undefined
Default
—
Requirement
optional
Prop
eyebrow
Type
string | undefined
Default
—
Requirement
optional
Prop
title
Type
string | undefined
Default
—
Requirement
optional
Prop
description
Type
string | undefined
Default
—
Requirement
optional
Prop
footerActions
Type
boolean | undefined
Default
false
Requirement
optional
Prop
accent
Type
boolean | undefined
Default
false
Requirement
optional
Prop
interactive
Type
boolean | undefined
Default
—
Requirement
optional
Prop
href
Type
string | undefined
Default
—
Requirement
optional
Prop
selected
Type
boolean | undefined
Default
—
Requirement
optional
Prop
disabled
Type
boolean | undefined
Default
—
Requirement
optional
Prop
loading
Type
boolean | undefined
Default
—
Requirement
optional

Events

EventPayload
activate[detail: CardActivateEvent]

Content regions

  • default
  • footer
  • header
  • media

Import

import { Component } from "@angular/core";
import {
  GrassrootCard,
  GrassrootCardFooter,
  GrassrootCardHeader,
  GrassrootCardMedia,
} from "@grassroot/ui-angular";

Props

Prop
Type
Default
Requirement
framed
boolean
false
optional
emphasis
CardEmphasis | undefined
—
optional
size
CardSize
"default"
optional
orientation
CardOrientation | undefined
—
optional
eyebrow
string
—
optional
title
string
—
optional
description
string
—
optional
accent
boolean
false
optional
footerActions
boolean
false
optional
interactive
boolean | undefined
—
optional
selected
boolean | undefined
—
optional
disabled
boolean | undefined
—
optional
loading
boolean | undefined
—
optional
Prop
framed
Type
boolean
Default
false
Requirement
optional
Prop
emphasis
Type
CardEmphasis | undefined
Default
—
Requirement
optional
Prop
size
Type
CardSize
Default
"default"
Requirement
optional
Prop
orientation
Type
CardOrientation | undefined
Default
—
Requirement
optional
Prop
eyebrow
Type
string
Default
—
Requirement
optional
Prop
title
Type
string
Default
—
Requirement
optional
Prop
description
Type
string
Default
—
Requirement
optional
Prop
accent
Type
boolean
Default
false
Requirement
optional
Prop
footerActions
Type
boolean
Default
false
Requirement
optional
Prop
interactive
Type
boolean | undefined
Default
—
Requirement
optional
Prop
selected
Type
boolean | undefined
Default
—
Requirement
optional
Prop
disabled
Type
boolean | undefined
Default
—
Requirement
optional
Prop
loading
Type
boolean | undefined
Default
—
Requirement
optional

Events

EventPayload
activateCardActivateEvent

Content regions

  • default
  • footer
  • header
  • media

Import

import { Card } from "@grassroot/ui-svelte";

Props

Prop
Type
Default
Requirement
framed
boolean
false
optional
emphasis
CardEmphasis
—
optional
size
CardSize
"default"
optional
orientation
CardOrientation
—
optional
eyebrow
string
—
optional
title
string
—
optional
description
string
—
optional
footerActions
boolean
false
optional
accent
boolean
false
optional
interactive
boolean
—
optional
href
string
—
optional
selected
boolean
—
optional
disabled
boolean
—
optional
loading
boolean
—
optional
Prop
framed
Type
boolean
Default
false
Requirement
optional
Prop
emphasis
Type
CardEmphasis
Default
—
Requirement
optional
Prop
size
Type
CardSize
Default
"default"
Requirement
optional
Prop
orientation
Type
CardOrientation
Default
—
Requirement
optional
Prop
eyebrow
Type
string
Default
—
Requirement
optional
Prop
title
Type
string
Default
—
Requirement
optional
Prop
description
Type
string
Default
—
Requirement
optional
Prop
footerActions
Type
boolean
Default
false
Requirement
optional
Prop
accent
Type
boolean
Default
false
Requirement
optional
Prop
interactive
Type
boolean
Default
—
Requirement
optional
Prop
href
Type
string
Default
—
Requirement
optional
Prop
selected
Type
boolean
Default
—
Requirement
optional
Prop
disabled
Type
boolean
Default
—
Requirement
optional
Prop
loading
Type
boolean
Default
—
Requirement
optional
Prop
onActivate
Type
(detail: CardActivateEvent) => void
Default
—
Requirement
optional
Prop
class
Type
string
Default
—
Requirement
optional

Events

EventPayload
onActivate(detail: CardActivateEvent) => void

Content regions

  • children
  • footer
  • header
  • media

Import

import { For } from "solid-js";
import { Card } from "@grassroot/ui-solid";

Props

Prop
Type
Default
Requirement
framed
boolean
false
optional
emphasis
CardEmphasis
—
optional
size
CardSize
"default"
optional
orientation
CardOrientation
—
optional
footerActions
boolean
false
optional
accent
boolean
—
optional
interactive
boolean
—
optional
href
string
—
optional
selected
boolean
—
optional
disabled
boolean
—
optional
loading
boolean
—
optional
onActivate
(detail: CardActivateEvent) => void
—
optional
className
string
—
optional
Prop
framed
Type
boolean
Default
false
Requirement
optional
Prop
emphasis
Type
CardEmphasis
Default
—
Requirement
optional
Prop
size
Type
CardSize
Default
"default"
Requirement
optional
Prop
orientation
Type
CardOrientation
Default
—
Requirement
optional
Prop
footerActions
Type
boolean
Default
false
Requirement
optional
Prop
accent
Type
boolean
Default
—
Requirement
optional
Prop
interactive
Type
boolean
Default
—
Requirement
optional
Prop
href
Type
string
Default
—
Requirement
optional
Prop
selected
Type
boolean
Default
—
Requirement
optional
Prop
disabled
Type
boolean
Default
—
Requirement
optional
Prop
loading
Type
boolean
Default
—
Requirement
optional
Prop
onActivate
Type
(detail: CardActivateEvent) => void
Default
—
Requirement
optional
Prop
className
Type
string
Default
—
Requirement
optional

Events

EventPayload
onActivate(detail: CardActivateEvent) => void

Content regions

  • children
  • description
  • eyebrow
  • footer
  • header
  • media
  • title

Native attributes

Standard DOM and ARIA attributes not listed above spread onto the root element.