EDS4 logo
@eds/card
v4.2.0

Card

A styled container that groups related content and actions.
Prop
Required
Description
Type
children
✅

React children containing CardHeader, CardBody and CardFooter components.

string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | { key?: string | number; ref?: null; props?: { children?: boolean | ReactChild | ReactPortal | StrictReactFragment; }; } | (boolean | ReactChild | ReactPortal | StrictReactFragment)[]
hideBorder
—

Optionally hide the card's border if placed on a dark background. Defaults to false.

boolean
layout
—

Optionally determine the cards layout direction. Default to vertical

"vertical" | "horizontal"Supports responsive prop syntax
containerType
—

Declare container type

"size" | "inline-size"
backgroundColor
—

The backgroundColor property sets the background color of an element.

"themePrimaryBase" | "themePrimary100" | "themePrimary200" | "themePrimary300" | "themePrimary400" | "themePrimary500" | "themePrimary600" | "themeAccentBase" | "themeAccent100" | "themeAccent200" | "themeAccent300" | "themeAccent400" | "themeAccent500" | "themeAccent600" | "neutral" | "neutralInverted" | "neutralHover" | "neutralPressed" | "neutralDisabled" | "neutralSubtle" | "neutralBold" | "input" | "inputDisabled" | "positiveSubtle" | "positiveBold" | "informativeSubtle" | "informativeBold" | "cautionSubtle" | "cautionBold" | "criticalSubtle" | "criticalBold" | "criticalBoldHover" | "criticalBoldPressed"Supports responsive prop syntax
boxShadow
—

The boxShadow property adds shadow effects around an element's frame.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none"Supports responsive prop syntax
className
—

The className prop can be used to add CSS classes to the box.

string
cursor
—

The cursor property sets the type of mouse cursor, if any, to show when the mouse pointer is over an element.

"none" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "-moz-grab" | "-webkit-grab" | "alias" | "all-scroll" | "auto" | "cell" | "col-resize" | "context-menu" | "copy" | "crosshair" | "default" | "e-resize" | "ew-resize" | "grab" | "grabbing" | "help" | "move" | "n-resize" | "ne-resize" | "nesw-resize" | "no-drop" | "not-allowed" | "ns-resize" | "nw-resize" | "nwse-resize" | "pointer" | "progress" | "row-resize" | "s-resize" | "se-resize" | "sw-resize" | "text" | "vertical-text" | "w-resize" | "wait" | "zoom-in" | "zoom-out"Supports responsive prop syntax
overflowX
—

The overflowY property sets what shows when content overflows a block-level element's left and right edges.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | "-moz-hidden-unscrollable" | "clip" | "hidden" | "scroll" | "visible"Supports responsive prop syntax
overflowY
—

The overflowY property sets what shows when content overflows a block-level element's top and bottom edges.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | "-moz-hidden-unscrollable" | "clip" | "hidden" | "scroll" | "visible"Supports responsive prop syntax
overflowWrap
—

Configures the wrapping behaviour for overflowing content

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "anywhere" | "break-word" | "normal"Supports responsive prop syntax
hyphens
—

Configures the hyphen behaviour for overflowing content

"none" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | "manual"Supports responsive prop syntax
userSelect
—

The userSelect property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes.

"none" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | "text" | "-moz-none" | "all" | "contain" | "element"Supports responsive prop syntax
alignContent
—

The alignContent property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "space-around" | "space-between" | "space-evenly" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline"Supports responsive prop syntax
alignItems
—

The alignItems property sets the align-self value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "self-end" | "self-start"Supports responsive prop syntax
alignSelf
—

The alignSelf property overrides a grid or flex item's align-items value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | "normal" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "self-end" | "self-start"Supports responsive prop syntax
textAlign
—

The textAlign property specifies the horizontal alignment of text in an element. It also allows the centering of elements inside a Box while preserving the display: block property

"right" | "left" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "center" | "end" | "start" | "-webkit-match-parent" | "justify" | "match-parent"Supports responsive prop syntax
gap
—

The gap property sets the gaps (gutters) between rows and columns. It is a shorthand for row-gap and column-gap.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
columnGap
—

The columnGap property sets the gaps (gutters) between columns.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
rowGap
—

The rowGap property sets the gaps (gutters) between rows.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
justifyContent
—

The justifyContent property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container.

"right" | "left" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "space-around" | "space-between" | "space-evenly" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start"Supports responsive prop syntax
order
—

The order property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending order value and then by their source code order.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"Supports responsive prop syntax
color
—

The color property sets the text color of an element.

"themePrimaryBase" | "themePrimary100" | "themePrimary200" | "themePrimary300" | "themePrimary400" | "themePrimary500" | "themePrimary600" | "themeAccentBase" | "themeAccent100" | "themeAccent200" | "themeAccent300" | "themeAccent400" | "themeAccent500" | "themeAccent600" | "neutralDisabled" | "neutralSubtle" | "neutralBold" | "neutralBoldInverted" | "positive" | "informative" | "caution" | "critical"Supports responsive prop syntax
height
—

The height property sets an element's height.

width
—

The width property sets an element's width.

minHeight
—

The minHeight property sets the minimum height of an element. It prevents the used value of the height property from becoming smaller than the value specified for minHeight.

minWidth
—

The minWidth property sets the minimum width of an element. It prevents the used value of the width property from becoming smaller than the value specified for minWidth.

maxHeight
—

The maxHeight CSS property sets the maximum height of an element. It prevents the used value of the height property from becoming larger than the value specified for maxHeight.

maxWidth
—

The maxWidth CSS property sets the maximum width of an element. It prevents the used value of the width property from becoming larger than the value specified by maxWidth.

position
—

The position property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"Supports responsive prop syntax
top
—

The top property participates in specifying the vertical position of a positioned element. It has no effect on non-positioned elements.

right
—

The right property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements.

bottom
—

The bottom property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements.

left
—

The left property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements.

zIndex
—

The zIndex property sets the "z-order" of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one.

"card" | "dropdown" | "menu" | "blanket" | "modal" | "toast"Supports responsive prop syntax
scrollMarginTop
—

The scroll-margin-top property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets.

string | number
transform
—

The transform property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model.

"none" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"Supports responsive prop syntax
flex
—

The flex shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container.

flexBasis
—

The flexBasis property sets the initial main size of a flex item.

flexFlow
—

The flexFlow shorthand property specifies the direction of a flex container, as well as its wrapping behavior.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse"Supports responsive prop syntax
flexGrow
—

The flexGrow property sets the flex grow factor of a flex item main size.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"Supports responsive prop syntax
flexShrink
—

The flexShrink property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to flex-shrink.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"Supports responsive prop syntax
flexWrap
—

Allow flex items to flow (wrap) onto multiple lines.

"-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap" | "wrap-reverse"Supports responsive prop syntax
margin
—

The margin shorthand property sets the margin area on all four sides of an element at once.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
marginTop
—

The marginTop property sets the margin area on the top side of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
marginRight
—

The marginRight property sets the margin area on the right side of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
marginBottom
—

The marginBottom property sets the margin area on the bottom side of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
marginLeft
—

The marginLeft property sets the margin area on the left side of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
marginY
—

The marginY shorthand property sets the margin area on the top and bottom of the element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
marginX
—

The marginY shorthand property sets the margin area on the left and right of the element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
padding
—

The padding shorthand property sets the padding area on all four sides of an element at once.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
paddingTop
—

The paddingTop property sets the height of the padding area on the top of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
paddingRight
—

The paddingRight property sets the width of the padding area on the right of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
paddingBottom
—

The paddingBottom property sets the height of the padding area on the bottom of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
paddingLeft
—

The paddingLeft property sets the width of the padding area on the left of an element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
paddingY
—

The paddingY shorthand property sets the padding area on the top and bottom of the element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
paddingX
—

The paddingX shorthand property sets the padding area on the left and right of the element.

"xsmall" | "small" | "medium" | "large" | "xlarge" | "none" | "auto" | "xxsmall" | "xxlarge"Supports responsive prop syntax
fontFamily
—

fontSize
—

"xsmall" | "small" | "medium" | "large" | "xlarge" | "xxsmall" | "xxlarge" | "standard"Supports responsive prop syntax
fontWeight
—

"medium" | "regular" | "bold"Supports responsive prop syntax
lineHeight
—

"nospace" | "tight" | "loose"Supports responsive prop syntax
inline
—

Display as an inline-level flex container.

boolean
Prop
Required
Description
Type
children
✅

React component that will be the content of the CardHeader.

string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | { key?: string | number; ref?: null; props?: { children?: boolean | ReactChild | ReactPortal | StrictReactFragment; }; } | (boolean | ReactChild | ReactPortal | StrictReactFragment)[]
spacing
—

Sets the spacing area on all four sides of the CardHeader. Defaults to medium.

"small" | "medium" | "large" | "none"Supports responsive prop syntax
divider
—

Divider to separate the CardHeader from CardBody. Defaults to false.

boolean
Prop
Required
Description
Type
children
✅

React component that will be the content of the CardBody.

string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | { key?: string | number; ref?: null; props?: { children?: boolean | ReactChild | ReactPortal | StrictReactFragment; }; } | (boolean | ReactChild | ReactPortal | StrictReactFragment)[]
spacing
—

Sets the spacing area on all four sides of the CardBody. Defaults to medium.

"small" | "medium" | "large" | "none"Supports responsive prop syntax
Prop
Required
Description
Type
children
✅

React component that will be the content of the CardFooter.

string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | { key?: string | number; ref?: null; props?: { children?: boolean | ReactChild | ReactPortal | StrictReactFragment; }; } | (boolean | ReactChild | ReactPortal | StrictReactFragment)[]
spacing
—

Sets the spacing area on all four sides of the CardFooter. Defaults to medium.

"small" | "medium" | "large" | "none"Supports responsive prop syntax
divider
—

Divider to separate the CardFooter from CardBody. Defaults to false.

boolean