Skip to main content
PROYECTOVIVIANA

Card

The props declared for Card, generated from the types @proyecto-viviana/ui ships.

Import

import { Card } from "@proyecto-viviana/ui";

Props

Differs from @proyecto-viviana/solid-spectrum
  • mesh exists only here.
  • meshSeed exists only here.
Props for Card in @proyecto-viviana/ui
PropTypeDefaultDescription
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | ((renderProps: CardRenderProps) => JSX.Element)—The children of the Card.
size'S' | 'M' | 'L' | 'XL' | 'XS''M'The size of the Card.
density'compact' | 'regular' | 'spacious''regular'The amount of internal padding within the Card.
variant'primary' | 'secondary' | 'quiet' | 'tertiary''primary'The visual style of the Card.
mesh'ambient' | 'signal'—The register's woven hex-mesh weave, painted behind the glass fill — `ambient` is the quiet mixed slate/blue/fuchsia weave, `signal` the single-hue detail-yellow one. Only the filled variants take it; `tertiary` and `quiet` have no fill for a weave to sit under.
meshSeednumber42Seed for the mesh weave, so neighboring cards don't repeat the same pattern.
hrefstring—Link target for standalone navigable cards.
downloadstring | boolean—Not yet documented
targetstring—Not yet documented
relstring—Not yet documented
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring | UnsafeClassName—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Backward-compatible class alias. Prefer UNSAFE_className for S2 parity.
slotstring—Slot name when used in a Spectrum context.
refHTMLElement | ((el: HTMLElement) => void) | { current?: HTMLElement | null | undefined; }—Ref for the rendered card element.
id*Key—The unique key for the item. solidaria-components
isDisabledfalse | true—Whether this item is disabled. solidaria-components
routerOptionsRouterOptions—Router options forwarded to client router navigation, when href is provided. solidaria-components
pingstring—Not yet documented solidaria
referrerPolicy'' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'—Not yet documented solidaria
onAction() => void—Handler called when the item is activated. solidaria-components
itemobject—The item value. solidaria-components
textValuestring—The text value of the item (for accessibility). solidaria-components

Declared in packages/viviana-ui/src/card/index.tsx.

CardPreview props

Differs from @proyecto-viviana/solid-spectrum
  • background exists only here.
  • tag exists only here.
Props for CardPreview in @proyecto-viviana/ui
PropTypeDefaultDescription
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Not yet documented
background"inset"—Recessed fill behind the preview. `inset` sits the region on `--surface-inset` — the register's console-strip treatment, where the full-bleed header bar reads sunk into the card rather than flush with it.
tagnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Local addition — no S2 counterpart. A corner tag pinned over the top-start of the media, drawn on the register's glass scrim: the media card's category stamp (TerminalGlassLab.tsx, §06). It cannot be a plain child because the preview clips its content to the card radius and the tag has to float above that clip; and it cannot be a context-styled `Badge`, because `getAllowedOverrides()` admits only positioning properties, so the scrim fill could not ride a `styles` override.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring | UnsafeClassName—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
refHTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Not yet documented

Declared in packages/viviana-ui/src/card/index.tsx.

CardRender props

Props for CardRender in @proyecto-viviana/ui
PropTypeDefaultDescription
size*'S' | 'M' | 'L' | 'XL' | 'XS'—The size of the Card.

Declared in packages/viviana-ui/src/card/index.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.