- Name
source- Kind
- property
- Type
unknown- Requirement
- required
card headless API
The core connector and vanilla mount are always visible. Use the framework choice to inspect native composition, props, outputs, context and hooks for the selected adapter.
@grassroot/ui-headless-core/card
Core connector and vanilla API
CardActivateEvent
interfaceWhat triggered the activation — adapters forward the native event as `source`.
interface CardActivateEvent { readonly via: "pointer" | "key"; readonly source: unknown;}sourceunknownvia"pointer" | "key"- Name
via- Kind
- property
- Type
"pointer" | "key"- Requirement
- required
cardAnatomy
valueexport declare const cardAnatomy: { readonly scope: "card"; readonly parts: readonly ["root", "media", "header", "eyebrow", "title", "description", "body", "footer"];};partsreadonly ["root", "media", "header", "eyebrow", "title", "description", "body", "footer"]scope"card"- Name
parts- Kind
- property
- Type
readonly ["root", "media", "header", "eyebrow", "title", "description", "body", "footer"]- Requirement
- required
- Name
scope- Kind
- property
- Type
"card"- Requirement
- required
CardApi
interfaceinterface CardApi { rootProps(): PartProps; mediaProps(): PartProps; headerProps(): PartProps; eyebrowProps(): PartProps; titleProps(): PartProps; descriptionProps(): PartProps; bodyProps(): PartProps; footerProps(): PartProps; /** The element an adapter should render the root as. */ readonly rootTag: "a" | "div"; readonly interactive: boolean;}bodyProps() => PartPropsdescriptionProps() => PartPropseyebrowProps() => PartPropsheaderProps() => PartPropsinteractivebooleanmediaProps() => PartPropsrootProps() => PartPropsrootTag"a" | "div"titleProps() => PartProps- Name
bodyProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
descriptionProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
eyebrowProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
footerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
headerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- required
- Description
- —
- Name
mediaProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootTag- Kind
- property
- Type
"a" | "div"- Requirement
- required
- Description
- The element an adapter should render the root as.
- Name
titleProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
CardConnectOptions
interfaceinterface CardConnectOptions { readonly emphasis?: CardEmphasis; readonly size?: CardSize; readonly orientation?: CardOrientation; /** Renders the root as an activatable control (`role="button"` + keys). */ readonly interactive?: boolean; /** Renders the root as a link. Wins over `interactive` when both are set. */ readonly href?: string; readonly selected?: boolean; readonly disabled?: boolean; readonly loading?: boolean; /** Fired by click and by Enter/Space on an interactive (non-link) card. */ readonly onActivate?: (event: CardActivateEvent) => void;}disabledbooleanemphasisCardEmphasishrefstringinteractivebooleanloadingbooleanonActivate(event: CardActivateEvent) => voidorientationCardOrientationselectedbooleansizeCardSize- Name
disabled- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
emphasis- Kind
- property
- Type
CardEmphasis- Requirement
- optional
- Description
- —
- Name
href- Kind
- property
- Type
string- Requirement
- optional
- Description
- Renders the root as a link. Wins over `interactive` when both are set.
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Renders the root as an activatable control (`role="button"` + keys).
- Name
loading- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
onActivate- Kind
- property
- Type
(event: CardActivateEvent) => void- Requirement
- optional
- Description
- Fired by click and by Enter/Space on an interactive (non-link) card.
- Name
orientation- Kind
- property
- Type
CardOrientation- Requirement
- optional
- Description
- —
- Name
selected- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
size- Kind
- property
- Type
CardSize- Requirement
- optional
- Description
- —
CardEmphasis
typeElevation/edge treatment. `outlined` is the default; one level only.
type CardEmphasis = "outlined" | "elevated" | "filled" | "dashed";CardOrientation
type`horizontal` puts the media slot beside the body instead of above it.
type CardOrientation = "vertical" | "horizontal";CardPart
typetype CardPart = (typeof cardAnatomy.parts)[number];CardSize
typePadding + type step. Radius never changes with size.
type CardSize = "compact" | "default" | "spacious";connectCard
functiondeclare function connectCard(scope: PartScope, options?: CardConnectOptions): CardApi;scopePartScopeoptionsCardConnectOptionsreturnCardApi- Name
scope- Kind
- parameter
- Type
PartScope- Requirement
- required
- Name
options- Kind
- parameter
- Type
CardConnectOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
CardApi- Requirement
- n/a
Framework adapters
Each panel keeps its adapter's public vocabulary. React compound exports, Vue composables, standalone Angular declarations, Svelte components, and Solid hooks stay native to their framework.
React imports
import { Body, Card, Description, Eyebrow, Footer, Header, Media, Root } from "@grassroot/ui-headless-react/card"; // +1 more exportsVue imports
<script setup lang="ts">import { CardBody, CardDescription, CardEyebrow, CardFooter, CardHeader, CardMedia, CardRoot, CardTitle } from "@grassroot/ui-headless-vue/card";</script>Angular imports
import { Component } from "@angular/core";import { GR_CARD_DECLARATIONS } from "@grassroot/ui-headless-angular/card"; @Component({ standalone: true, imports: [GR_CARD_DECLARATIONS], template: `<!-- compose the card parts here -->` })export class Example {}Svelte imports
<script lang="ts"> import { CardBody, CardDescription, CardEyebrow, CardFooter, CardHeader, CardMedia, CardRoot, CardTitle } from "@grassroot/ui-headless-svelte/card";</script>Solid imports
import { CardBody, CardDescription, CardEyebrow, CardFooter, CardHeader, CardMedia, CardRoot, CardTitle } from "@grassroot/ui-headless-solid/card";@grassroot/ui-headless-react/card
React adapter
Body
valueexport declare const Body: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Card
valueexport declare const Card: { Root: import("react").ForwardRefExoticComponent<CardRootProps & import("react").RefAttributes<HTMLElement>>; Media: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>; Header: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>; Eyebrow: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>; Title: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>; Description: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>; Body: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>; Footer: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>;};Bodyimport("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>Descriptionimport("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>Eyebrowimport("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>Headerimport("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>Mediaimport("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>Rootimport("react").ForwardRefExoticComponent<CardRootProps & import("react").RefAttributes<HTMLElement>>Titleimport("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Name
Body- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
- Name
Description- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
- Name
Eyebrow- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
- Name
Footer- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
- Name
Header- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
- Name
Media- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
- Name
Root- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardRootProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
- Name
Title- Kind
- property
- Type
import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>- Requirement
- required
CardActivateEvent
interfaceWhat triggered the activation — adapters forward the native event as `source`.
interface CardActivateEvent { readonly via: "pointer" | "key"; readonly source: unknown;}sourceunknownvia"pointer" | "key"- Name
source- Kind
- property
- Type
unknown- Requirement
- required
- Name
via- Kind
- property
- Type
"pointer" | "key"- Requirement
- required
CardApi
interfaceinterface CardApi { rootProps(): PartProps; mediaProps(): PartProps; headerProps(): PartProps; eyebrowProps(): PartProps; titleProps(): PartProps; descriptionProps(): PartProps; bodyProps(): PartProps; footerProps(): PartProps; /** The element an adapter should render the root as. */ readonly rootTag: "a" | "div"; readonly interactive: boolean;}bodyProps() => PartPropsdescriptionProps() => PartPropseyebrowProps() => PartPropsheaderProps() => PartPropsinteractivebooleanmediaProps() => PartPropsrootProps() => PartPropsrootTag"a" | "div"titleProps() => PartProps- Name
bodyProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
descriptionProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
eyebrowProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
footerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
headerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- required
- Description
- —
- Name
mediaProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootTag- Kind
- property
- Type
"a" | "div"- Requirement
- required
- Description
- The element an adapter should render the root as.
- Name
titleProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
CardConnectOptions
interfaceinterface CardConnectOptions { readonly emphasis?: CardEmphasis; readonly size?: CardSize; readonly orientation?: CardOrientation; /** Renders the root as an activatable control (`role="button"` + keys). */ readonly interactive?: boolean; /** Renders the root as a link. Wins over `interactive` when both are set. */ readonly href?: string; readonly selected?: boolean; readonly disabled?: boolean; readonly loading?: boolean; /** Fired by click and by Enter/Space on an interactive (non-link) card. */ readonly onActivate?: (event: CardActivateEvent) => void;}disabledbooleanemphasisCardEmphasishrefstringinteractivebooleanloadingbooleanonActivate(event: CardActivateEvent) => voidorientationCardOrientationselectedbooleansizeCardSize- Name
disabled- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
emphasis- Kind
- property
- Type
CardEmphasis- Requirement
- optional
- Description
- —
- Name
href- Kind
- property
- Type
string- Requirement
- optional
- Description
- Renders the root as a link. Wins over `interactive` when both are set.
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Renders the root as an activatable control (`role="button"` + keys).
- Name
loading- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
onActivate- Kind
- property
- Type
(event: CardActivateEvent) => void- Requirement
- optional
- Description
- Fired by click and by Enter/Space on an interactive (non-link) card.
- Name
orientation- Kind
- property
- Type
CardOrientation- Requirement
- optional
- Description
- —
- Name
selected- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
size- Kind
- property
- Type
CardSize- Requirement
- optional
- Description
- —
CardContext
valueexport declare const CardContext: import("react").Context<CardContextValue | null>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
CardContextValue
interfaceinterface CardContextValue { readonly connector: CardApi; readonly scope: PartScope;}connectorCardApiscopePartScope- Name
connector- Kind
- property
- Type
CardApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
CardEmphasis
typeElevation/edge treatment. `outlined` is the default; one level only.
type CardEmphasis = "outlined" | "elevated" | "filled" | "dashed";CardOrientation
type`horizontal` puts the media slot beside the body instead of above it.
type CardOrientation = "vertical" | "horizontal";CardPartProps
interfaceinterface CardPartProps extends ComponentPropsWithoutRef<"div"> { readonly asChild?: boolean; readonly children?: ReactNode;}asChildbooleanchildrenReactNode- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
children- Kind
- property
- Type
ReactNode- Requirement
- optional
CardRootProps
interfaceinterface CardRootProps extends Omit<ComponentPropsWithoutRef<"div">, "onSelect">, CardConnectOptions { readonly asChild?: boolean; readonly children?: ReactNode;}asChildbooleanchildrenReactNode- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
children- Kind
- property
- Type
ReactNode- Requirement
- optional
CardSize
typePadding + type step. Radius never changes with size.
type CardSize = "compact" | "default" | "spacious";Description
valueexport declare const Description: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Eyebrow
valueexport declare const Eyebrow: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Header
valueexport declare const Header: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Media
valueexport declare const Media: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Root
valueexport declare const Root: import("react").ForwardRefExoticComponent<CardRootProps & import("react").RefAttributes<HTMLElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Title
valueexport declare const Title: import("react").ForwardRefExoticComponent<CardPartProps & import("react").RefAttributes<HTMLElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
useCardContext
functiondeclare function useCardContext(partName: string): CardContextValue;partNamestringreturnCardContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
CardContextValue- Requirement
- n/a
@grassroot/ui-headless-vue/card
Vue adapter
CardActivateEvent
interfaceWhat triggered the activation — adapters forward the native event as `source`.
interface CardActivateEvent { readonly via: "pointer" | "key"; readonly source: unknown;}sourceunknownvia"pointer" | "key"- Name
source- Kind
- property
- Type
unknown- Requirement
- required
- Name
via- Kind
- property
- Type
"pointer" | "key"- Requirement
- required
CardApi
interfaceinterface CardApi { rootProps(): PartProps; mediaProps(): PartProps; headerProps(): PartProps; eyebrowProps(): PartProps; titleProps(): PartProps; descriptionProps(): PartProps; bodyProps(): PartProps; footerProps(): PartProps; /** The element an adapter should render the root as. */ readonly rootTag: "a" | "div"; readonly interactive: boolean;}bodyProps() => PartPropsdescriptionProps() => PartPropseyebrowProps() => PartPropsheaderProps() => PartPropsinteractivebooleanmediaProps() => PartPropsrootProps() => PartPropsrootTag"a" | "div"titleProps() => PartProps- Name
bodyProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
descriptionProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
eyebrowProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
footerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
headerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- required
- Description
- —
- Name
mediaProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootTag- Kind
- property
- Type
"a" | "div"- Requirement
- required
- Description
- The element an adapter should render the root as.
- Name
titleProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
CardBody
valueexport declare const CardBody: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;CardConnectOptions
interfaceinterface CardConnectOptions { readonly emphasis?: CardEmphasis; readonly size?: CardSize; readonly orientation?: CardOrientation; /** Renders the root as an activatable control (`role="button"` + keys). */ readonly interactive?: boolean; /** Renders the root as a link. Wins over `interactive` when both are set. */ readonly href?: string; readonly selected?: boolean; readonly disabled?: boolean; readonly loading?: boolean; /** Fired by click and by Enter/Space on an interactive (non-link) card. */ readonly onActivate?: (event: CardActivateEvent) => void;}disabledbooleanemphasisCardEmphasishrefstringinteractivebooleanloadingbooleanonActivate(event: CardActivateEvent) => voidorientationCardOrientationselectedbooleansizeCardSize- Name
disabled- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
emphasis- Kind
- property
- Type
CardEmphasis- Requirement
- optional
- Description
- —
- Name
href- Kind
- property
- Type
string- Requirement
- optional
- Description
- Renders the root as a link. Wins over `interactive` when both are set.
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Renders the root as an activatable control (`role="button"` + keys).
- Name
loading- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
onActivate- Kind
- property
- Type
(event: CardActivateEvent) => void- Requirement
- optional
- Description
- Fired by click and by Enter/Space on an interactive (non-link) card.
- Name
orientation- Kind
- property
- Type
CardOrientation- Requirement
- optional
- Description
- —
- Name
selected- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
size- Kind
- property
- Type
CardSize- Requirement
- optional
- Description
- —
CardContextKey
valueexport declare const CardContextKey: InjectionKey<CardContextValue>;CardContextValue
interfaceinterface CardContextValue { readonly connector: CardApi; readonly scope: PartScope;}connectorCardApiscopePartScope- Name
connector- Kind
- property
- Type
CardApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
CardDescription
valueexport declare const CardDescription: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;CardEmphasis
typeElevation/edge treatment. `outlined` is the default; one level only.
type CardEmphasis = "outlined" | "elevated" | "filled" | "dashed";CardEyebrow
valueexport declare const CardEyebrow: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;CardHeader
valueexport declare const CardHeader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;CardMedia
valueexport declare const CardMedia: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;CardOrientation
type`horizontal` puts the media slot beside the body instead of above it.
type CardOrientation = "vertical" | "horizontal";CardRoot
valueexport declare const CardRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; emphasis: { type: PropType<CardEmphasis | undefined>; default: undefined; }; size: { type: PropType<CardSize | undefined>; default: undefined; }; orientation: { type: PropType<CardOrientation | undefined>; default: undefined; }; interactive: { type: PropType<boolean | undefined>; default: undefined; }; href: { type: PropType<string | undefined>; default: undefined; }; selected: { type: PropType<boolean | undefined>; default: undefined; }; disabled: { type: PropType<boolean | undefined>; default: undefined; }; loading: { type: PropType<boolean | undefined>; default: undefined; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { activate: (_detail: CardActivateEvent) => true;}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; emphasis: { type: PropType<CardEmphasis | undefined>; default: undefined; }; size: { type: PropType<CardSize | undefined>; default: undefined; }; orientation: { type: PropType<CardOrientation | undefined>; default: undefined; }; interactive: { type: PropType<boolean | undefined>; default: undefined; }; href: { type: PropType<string | undefined>; default: undefined; }; selected: { type: PropType<boolean | undefined>; default: undefined; }; disabled: { type: PropType<boolean | undefined>; default: undefined; }; loading: { type: PropType<boolean | undefined>; default: undefined; };}>> & Readonly<{ onActivate?: ((_detail: CardActivateEvent) => any) | undefined;}>, { asChild: boolean; emphasis: CardEmphasis | undefined; size: CardSize | undefined; orientation: CardOrientation | undefined; interactive: boolean | undefined; href: string | undefined; selected: boolean | undefined; disabled: boolean | undefined; loading: boolean | undefined;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;CardSize
typePadding + type step. Radius never changes with size.
type CardSize = "compact" | "default" | "spacious";CardTitle
valueexport declare const CardTitle: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;useCardContext
functiondeclare function useCardContext(partName: string): CardContextValue;partNamestringreturnCardContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
CardContextValue- Requirement
- n/a
@grassroot/ui-headless-angular/card
Angular adapter
CARD_STORE
valueexport declare const CARD_STORE: InjectionToken<CardStore>;CardActivateEvent
interfaceWhat triggered the activation — adapters forward the native event as `source`.
interface CardActivateEvent { readonly via: "pointer" | "key"; readonly source: unknown;}sourceunknownvia"pointer" | "key"- Name
source- Kind
- property
- Type
unknown- Requirement
- required
- Name
via- Kind
- property
- Type
"pointer" | "key"- Requirement
- required
CardApi
interfaceinterface CardApi { rootProps(): PartProps; mediaProps(): PartProps; headerProps(): PartProps; eyebrowProps(): PartProps; titleProps(): PartProps; descriptionProps(): PartProps; bodyProps(): PartProps; footerProps(): PartProps; /** The element an adapter should render the root as. */ readonly rootTag: "a" | "div"; readonly interactive: boolean;}bodyProps() => PartPropsdescriptionProps() => PartPropseyebrowProps() => PartPropsheaderProps() => PartPropsinteractivebooleanmediaProps() => PartPropsrootProps() => PartPropsrootTag"a" | "div"titleProps() => PartProps- Name
bodyProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
descriptionProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
eyebrowProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
footerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
headerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- required
- Description
- —
- Name
mediaProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootTag- Kind
- property
- Type
"a" | "div"- Requirement
- required
- Description
- The element an adapter should render the root as.
- Name
titleProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
CardConnectOptions
interfaceinterface CardConnectOptions { readonly emphasis?: CardEmphasis; readonly size?: CardSize; readonly orientation?: CardOrientation; /** Renders the root as an activatable control (`role="button"` + keys). */ readonly interactive?: boolean; /** Renders the root as a link. Wins over `interactive` when both are set. */ readonly href?: string; readonly selected?: boolean; readonly disabled?: boolean; readonly loading?: boolean; /** Fired by click and by Enter/Space on an interactive (non-link) card. */ readonly onActivate?: (event: CardActivateEvent) => void;}disabledbooleanemphasisCardEmphasishrefstringinteractivebooleanloadingbooleanonActivate(event: CardActivateEvent) => voidorientationCardOrientationselectedbooleansizeCardSize- Name
disabled- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
emphasis- Kind
- property
- Type
CardEmphasis- Requirement
- optional
- Description
- —
- Name
href- Kind
- property
- Type
string- Requirement
- optional
- Description
- Renders the root as a link. Wins over `interactive` when both are set.
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Renders the root as an activatable control (`role="button"` + keys).
- Name
loading- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
onActivate- Kind
- property
- Type
(event: CardActivateEvent) => void- Requirement
- optional
- Description
- Fired by click and by Enter/Space on an interactive (non-link) card.
- Name
orientation- Kind
- property
- Type
CardOrientation- Requirement
- optional
- Description
- —
- Name
selected- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
size- Kind
- property
- Type
CardSize- Requirement
- optional
- Description
- —
CardEmphasis
typeElevation/edge treatment. `outlined` is the default; one level only.
type CardEmphasis = "outlined" | "elevated" | "filled" | "dashed";CardOrientation
type`horizontal` puts the media slot beside the body instead of above it.
type CardOrientation = "vertical" | "horizontal";CardSize
typePadding + type step. Radius never changes with size.
type CardSize = "compact" | "default" | "spacious";CardStore
interfaceCard has no machine, so there is no store to start/stop/sync — the parts only ever need the current connector and the scope its ids come from.
export interface CardStore { readonly connector: Signal<CardApi>; readonly scope: PartScope;}connectorSignal<CardApi>scopePartScope- Name
connector- Kind
- property
- Type
Signal<CardApi>- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
GR_CARD_DECLARATIONS
valueexport declare const GR_CARD_DECLARATIONS: readonly [typeof GrCardRoot, typeof GrCardMedia, typeof GrCardHeader, typeof GrCardEyebrow, typeof GrCardTitle, typeof GrCardDescription, typeof GrCardBody, typeof GrCardFooter];GrCardBody
classexport declare class GrCardBody implements OnDestroy { private readonly store; private readonly elementRef; private readonly listeners; private readonly consumerProps; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCardBody, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCardBody, "[grCardBody]", never, {}, {}, never, never, true, never>;}consumerPropsanyelementRefanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrCardBody, "[grCardBody]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrCardBody, never>storeany- Name
consumerProps- Kind
- property
- Type
any- Requirement
- required
- Name
elementRef- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCardBody, "[grCardBody]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCardBody, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrCardDescription
classexport declare class GrCardDescription implements OnDestroy { private readonly store; private readonly elementRef; private readonly listeners; private readonly consumerProps; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCardDescription, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCardDescription, "[grCardDescription]", never, {}, {}, never, never, true, never>;}consumerPropsanyelementRefanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrCardDescription, "[grCardDescription]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrCardDescription, never>storeany- Name
consumerProps- Kind
- property
- Type
any- Requirement
- required
- Name
elementRef- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCardDescription, "[grCardDescription]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCardDescription, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrCardEyebrow
classexport declare class GrCardEyebrow implements OnDestroy { private readonly store; private readonly elementRef; private readonly listeners; private readonly consumerProps; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCardEyebrow, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCardEyebrow, "[grCardEyebrow]", never, {}, {}, never, never, true, never>;}consumerPropsanyelementRefanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrCardEyebrow, "[grCardEyebrow]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrCardEyebrow, never>storeany- Name
consumerProps- Kind
- property
- Type
any- Requirement
- required
- Name
elementRef- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCardEyebrow, "[grCardEyebrow]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCardEyebrow, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrCardHeader
classexport declare class GrCardHeader implements OnDestroy { private readonly store; private readonly elementRef; private readonly listeners; private readonly consumerProps; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCardHeader, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCardHeader, "[grCardHeader]", never, {}, {}, never, never, true, never>;}consumerPropsanyelementRefanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrCardHeader, "[grCardHeader]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrCardHeader, never>storeany- Name
consumerProps- Kind
- property
- Type
any- Requirement
- required
- Name
elementRef- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCardHeader, "[grCardHeader]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCardHeader, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrCardMedia
classexport declare class GrCardMedia implements OnDestroy { private readonly store; private readonly elementRef; private readonly listeners; private readonly consumerProps; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCardMedia, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCardMedia, "[grCardMedia]", never, {}, {}, never, never, true, never>;}consumerPropsanyelementRefanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrCardMedia, "[grCardMedia]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrCardMedia, never>storeany- Name
consumerProps- Kind
- property
- Type
any- Requirement
- required
- Name
elementRef- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCardMedia, "[grCardMedia]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCardMedia, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrCardRoot
classAn attribute selector, not a `gr-card-root` element: the connector picks `<a>` or `<div>` for the root, and only the consumer's own template can honour that. `<a grCardRoot [href]="…">` gets a real anchor; a custom element host could only ever fake one with role + tabindex.
export declare class GrCardRoot implements OnDestroy { readonly emphasis: import("@angular/core").InputSignal<CardEmphasis | undefined>; readonly size: import("@angular/core").InputSignal<CardSize | undefined>; readonly orientation: import("@angular/core").InputSignal<CardOrientation | undefined>; readonly interactive: import("@angular/core").InputSignal<boolean | undefined>; readonly href: import("@angular/core").InputSignal<string | undefined>; readonly selected: import("@angular/core").InputSignal<boolean | undefined>; readonly disabled: import("@angular/core").InputSignal<boolean | undefined>; readonly loading: import("@angular/core").InputSignal<boolean | undefined>; readonly activate: import("@angular/core").OutputEmitterRef<CardActivateEvent>; private readonly elementRef; private readonly listeners; private readonly scope; private readonly connector; readonly store: CardStore; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCardRoot, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCardRoot, "[grCardRoot]", never, { "emphasis": { "alias": "emphasis"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "activate": "activate"; }, never, never, true, never>;}activateimport("@angular/core").OutputEmitterRef<CardActivateEvent>connectoranydisabledimport("@angular/core").InputSignal<boolean | undefined>elementRefanyemphasisimport("@angular/core").InputSignal<CardEmphasis | undefined>hrefimport("@angular/core").InputSignal<string | undefined>interactiveimport("@angular/core").InputSignal<boolean | undefined>listenersanyloadingimport("@angular/core").InputSignal<boolean | undefined>ngOnDestroy() => voidorientationimport("@angular/core").InputSignal<CardOrientation | undefined>ɵdiri0.ɵɵDirectiveDeclaration<GrCardRoot, "[grCardRoot]", never, { "emphasis": { "alias": "emphasis"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "activate": "activate"; }, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrCardRoot, never>scopeany- Name
activate- Kind
- property
- Type
import("@angular/core").OutputEmitterRef<CardActivateEvent>- Requirement
- required
- Name
connector- Kind
- property
- Type
any- Requirement
- required
- Name
disabled- Kind
- property
- Type
import("@angular/core").InputSignal<boolean | undefined>- Requirement
- required
- Name
elementRef- Kind
- property
- Type
any- Requirement
- required
- Name
emphasis- Kind
- property
- Type
import("@angular/core").InputSignal<CardEmphasis | undefined>- Requirement
- required
- Name
href- Kind
- property
- Type
import("@angular/core").InputSignal<string | undefined>- Requirement
- required
- Name
interactive- Kind
- property
- Type
import("@angular/core").InputSignal<boolean | undefined>- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
loading- Kind
- property
- Type
import("@angular/core").InputSignal<boolean | undefined>- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
orientation- Kind
- property
- Type
import("@angular/core").InputSignal<CardOrientation | undefined>- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCardRoot, "[grCardRoot]", never, { "emphasis": { "alias": "emphasis"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "activate": "activate"; }, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCardRoot, never>- Requirement
- required
- Name
scope- Kind
- property
- Type
any- Requirement
- required
- Name
selected- Kind
- property
- Type
import("@angular/core").InputSignal<boolean | undefined>- Requirement
- required
- Name
size- Kind
- property
- Type
import("@angular/core").InputSignal<CardSize | undefined>- Requirement
- required
- Name
store- Kind
- property
- Type
CardStore- Requirement
- required
GrCardTitle
classexport declare class GrCardTitle implements OnDestroy { private readonly store; private readonly elementRef; private readonly listeners; private readonly consumerProps; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCardTitle, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCardTitle, "[grCardTitle]", never, {}, {}, never, never, true, never>;}consumerPropsanyelementRefanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrCardTitle, "[grCardTitle]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrCardTitle, never>storeany- Name
consumerProps- Kind
- property
- Type
any- Requirement
- required
- Name
elementRef- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCardTitle, "[grCardTitle]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCardTitle, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
@grassroot/ui-headless-svelte/card
Svelte adapter
CardActivateEvent
interfaceWhat triggered the activation — adapters forward the native event as `source`.
interface CardActivateEvent { readonly via: "pointer" | "key"; readonly source: unknown;}sourceunknownvia"pointer" | "key"- Name
source- Kind
- property
- Type
unknown- Requirement
- required
- Name
via- Kind
- property
- Type
"pointer" | "key"- Requirement
- required
CardApi
interfaceinterface CardApi { rootProps(): PartProps; mediaProps(): PartProps; headerProps(): PartProps; eyebrowProps(): PartProps; titleProps(): PartProps; descriptionProps(): PartProps; bodyProps(): PartProps; footerProps(): PartProps; /** The element an adapter should render the root as. */ readonly rootTag: "a" | "div"; readonly interactive: boolean;}bodyProps() => PartPropsdescriptionProps() => PartPropseyebrowProps() => PartPropsheaderProps() => PartPropsinteractivebooleanmediaProps() => PartPropsrootProps() => PartPropsrootTag"a" | "div"titleProps() => PartProps- Name
bodyProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
descriptionProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
eyebrowProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
footerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
headerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- required
- Description
- —
- Name
mediaProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootTag- Kind
- property
- Type
"a" | "div"- Requirement
- required
- Description
- The element an adapter should render the root as.
- Name
titleProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
CardBody
valueexport declare const CardBody: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
CardConnectOptions
interfaceinterface CardConnectOptions { readonly emphasis?: CardEmphasis; readonly size?: CardSize; readonly orientation?: CardOrientation; /** Renders the root as an activatable control (`role="button"` + keys). */ readonly interactive?: boolean; /** Renders the root as a link. Wins over `interactive` when both are set. */ readonly href?: string; readonly selected?: boolean; readonly disabled?: boolean; readonly loading?: boolean; /** Fired by click and by Enter/Space on an interactive (non-link) card. */ readonly onActivate?: (event: CardActivateEvent) => void;}disabledbooleanemphasisCardEmphasishrefstringinteractivebooleanloadingbooleanonActivate(event: CardActivateEvent) => voidorientationCardOrientationselectedbooleansizeCardSize- Name
disabled- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
emphasis- Kind
- property
- Type
CardEmphasis- Requirement
- optional
- Description
- —
- Name
href- Kind
- property
- Type
string- Requirement
- optional
- Description
- Renders the root as a link. Wins over `interactive` when both are set.
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Renders the root as an activatable control (`role="button"` + keys).
- Name
loading- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
onActivate- Kind
- property
- Type
(event: CardActivateEvent) => void- Requirement
- optional
- Description
- Fired by click and by Enter/Space on an interactive (non-link) card.
- Name
orientation- Kind
- property
- Type
CardOrientation- Requirement
- optional
- Description
- —
- Name
selected- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
size- Kind
- property
- Type
CardSize- Requirement
- optional
- Description
- —
CardContextValue
interfaceexport interface CardContextValue { readonly connector: () => CardApi; readonly scope: PartScope;}connector() => CardApiscopePartScope- Name
connector- Kind
- property
- Type
() => CardApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
CardDescription
valueexport declare const CardDescription: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
CardEmphasis
typeElevation/edge treatment. `outlined` is the default; one level only.
type CardEmphasis = "outlined" | "elevated" | "filled" | "dashed";CardEyebrow
valueexport declare const CardEyebrow: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
CardHeader
valueexport declare const CardHeader: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
CardMedia
valueexport declare const CardMedia: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
CardOrientation
type`horizontal` puts the media slot beside the body instead of above it.
type CardOrientation = "vertical" | "horizontal";CardRoot
valueexport declare const CardRoot: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
CardSize
typePadding + type step. Radius never changes with size.
type CardSize = "compact" | "default" | "spacious";CardTitle
valueexport declare const CardTitle: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
useCardContext
functionexport declare function useCardContext(partName: string): CardContextValue;partNamestringreturnCardContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
CardContextValue- Requirement
- n/a
@grassroot/ui-headless-solid/card
Solid adapter
CardActivateEvent
interfaceWhat triggered the activation — adapters forward the native event as `source`.
interface CardActivateEvent { readonly via: "pointer" | "key"; readonly source: unknown;}sourceunknownvia"pointer" | "key"- Name
source- Kind
- property
- Type
unknown- Requirement
- required
- Name
via- Kind
- property
- Type
"pointer" | "key"- Requirement
- required
CardApi
interfaceinterface CardApi { rootProps(): PartProps; mediaProps(): PartProps; headerProps(): PartProps; eyebrowProps(): PartProps; titleProps(): PartProps; descriptionProps(): PartProps; bodyProps(): PartProps; footerProps(): PartProps; /** The element an adapter should render the root as. */ readonly rootTag: "a" | "div"; readonly interactive: boolean;}bodyProps() => PartPropsdescriptionProps() => PartPropseyebrowProps() => PartPropsheaderProps() => PartPropsinteractivebooleanmediaProps() => PartPropsrootProps() => PartPropsrootTag"a" | "div"titleProps() => PartProps- Name
bodyProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
descriptionProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
eyebrowProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
footerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
headerProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- required
- Description
- —
- Name
mediaProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
- Name
rootTag- Kind
- property
- Type
"a" | "div"- Requirement
- required
- Description
- The element an adapter should render the root as.
- Name
titleProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Description
- —
CardBody
valueexport declare const CardBody: (props: CardPartProps) => JSX.Element;propsCardPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
CardPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
CardConnectOptions
interfaceinterface CardConnectOptions { readonly emphasis?: CardEmphasis; readonly size?: CardSize; readonly orientation?: CardOrientation; /** Renders the root as an activatable control (`role="button"` + keys). */ readonly interactive?: boolean; /** Renders the root as a link. Wins over `interactive` when both are set. */ readonly href?: string; readonly selected?: boolean; readonly disabled?: boolean; readonly loading?: boolean; /** Fired by click and by Enter/Space on an interactive (non-link) card. */ readonly onActivate?: (event: CardActivateEvent) => void;}disabledbooleanemphasisCardEmphasishrefstringinteractivebooleanloadingbooleanonActivate(event: CardActivateEvent) => voidorientationCardOrientationselectedbooleansizeCardSize- Name
disabled- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
emphasis- Kind
- property
- Type
CardEmphasis- Requirement
- optional
- Description
- —
- Name
href- Kind
- property
- Type
string- Requirement
- optional
- Description
- Renders the root as a link. Wins over `interactive` when both are set.
- Name
interactive- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Renders the root as an activatable control (`role="button"` + keys).
- Name
loading- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
onActivate- Kind
- property
- Type
(event: CardActivateEvent) => void- Requirement
- optional
- Description
- Fired by click and by Enter/Space on an interactive (non-link) card.
- Name
orientation- Kind
- property
- Type
CardOrientation- Requirement
- optional
- Description
- —
- Name
selected- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- —
- Name
size- Kind
- property
- Type
CardSize- Requirement
- optional
- Description
- —
CardContext
valueexport declare const CardContext: import("solid-js").Context<CardContextValue | undefined>;CardContextValue
interfaceexport interface CardContextValue { readonly connector: Accessor<CardApi>; readonly scope: PartScope;}connectorAccessor<CardApi>scopePartScope- Name
connector- Kind
- property
- Type
Accessor<CardApi>- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
CardDescription
valueexport declare const CardDescription: (props: CardPartProps) => JSX.Element;propsCardPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
CardPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
CardEmphasis
typeElevation/edge treatment. `outlined` is the default; one level only.
type CardEmphasis = "outlined" | "elevated" | "filled" | "dashed";CardEyebrow
valueexport declare const CardEyebrow: (props: CardPartProps) => JSX.Element;propsCardPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
CardPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
CardHeader
valueexport declare const CardHeader: (props: CardPartProps) => JSX.Element;propsCardPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
CardPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
CardMedia
valueexport declare const CardMedia: (props: CardPartProps) => JSX.Element;propsCardPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
CardPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
CardOrientation
type`horizontal` puts the media slot beside the body instead of above it.
type CardOrientation = "vertical" | "horizontal";CardPartProps
interfaceexport interface CardPartProps extends JSX.HTMLAttributes<HTMLElement> { readonly as?: AsProp;}asAsProp- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
CardRoot
functionexport declare function CardRoot(props: CardRootProps): JSX.Element;propsCardRootPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
CardRootProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
CardRootProps
interfaceexport interface CardRootProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "onSelect">, CardConnectOptions { readonly as?: AsProp; readonly onActivate?: (detail: CardActivateEvent) => void;}asAsProponActivate(detail: CardActivateEvent) => void- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
- Name
onActivate- Kind
- property
- Type
(detail: CardActivateEvent) => void- Requirement
- optional
CardSize
typePadding + type step. Radius never changes with size.
type CardSize = "compact" | "default" | "spacious";CardTitle
valueexport declare const CardTitle: (props: CardPartProps) => JSX.Element;propsCardPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
CardPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
useCardContext
functionexport declare function useCardContext(partName: string): CardContextValue;partNamestringreturnCardContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
CardContextValue- Requirement
- n/a