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
meshexists only here.meshSeedexists only here.
| Prop | Type | Default | Description |
|---|---|---|---|
children | number | 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. |
meshSeed | number | 42 | Seed for the mesh weave, so neighboring cards don't repeat the same pattern. |
href | string | — | Link target for standalone navigable cards. |
download | string | boolean | — | Not yet documented |
target | string | — | Not yet documented |
rel | string | — | Not yet documented |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | UnsafeClassName | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
class | string | — | Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. |
slot | string | — | Slot name when used in a Spectrum context. |
ref | HTMLElement | ((el: HTMLElement) => void) | { current?: HTMLElement | null | undefined; } | — | Ref for the rendered card element. |
id* | Key | — | The unique key for the item. solidaria-components |
isDisabled | false | true | — | Whether this item is disabled. solidaria-components |
routerOptions | RouterOptions | — | Router options forwarded to client router navigation, when href is provided. solidaria-components |
ping | string | — | 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 |
item | object | — | The item value. solidaria-components |
textValue | string | — | 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
backgroundexists only here.tagexists only here.
| Prop | Type | Default | Description |
|---|---|---|---|
children | number | 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. |
tag | number | 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. |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | UnsafeClassName | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
ref | HTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; } | — | Not yet documented |
Declared in packages/viviana-ui/src/card/index.tsx.
CardRender props
| Prop | Type | Default | Description |
|---|---|---|---|
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.