Card
Beta notice: This page is being built.Edit on GitHub(opens in new tab)
Card has one shared set of props. onChange makes it selectable, onClick or href makes it clickable, and otherwise it is a plain content card. Selection takes priority when both kinds of interaction props are supplied.
This is a LongLink-specific component.
longlink docs component "Card"
Example
Order details
Properties
| Card - Properties |
|---|
children Content rendered inside the card.ReactNode |
padding Inner spacing using the theme spacing scale.0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 |
isClipped Clips full-bleed content to the card's rounded edges.boolean |
variant Background color variant, independent of the interaction mode."default" | "transparent" | "muted" |
width Card width; numbers are pixels and strings are CSS sizes.string | number |
height Card height; numbers are pixels and strings are CSS sizes.string | number |
maxWidth Maximum card width.string | number |
minHeight Minimum card height.string | number |
inert Makes the card and its descendants non-interactive.boolean |
label Accessible label for interactive cards; supply a descriptive label.string |
onClick Runs when the card surface is activated.(event: ViewMouseEvent) => void |
href Link destination, used when onChange is absent.string |
target Link target; external URLs open in a new tab in Views.string |
isDisabled Disables activation of an interactive card.boolean |
isSelected Whether the card is selected.boolean |
onChange Enables selection and receives its next state, overriding onClick and href.(isSelected: boolean) => void |