The Card component is very flexible. Because of this it can create serious accessibility problems if used incorrectly. It is your responsibility as developer to follow these basic rules when using it:

  • Never put other interactive elements such as <Button>, <Radio>, <Checkbox>, <Link> etc inside a <ClickableCard> or a <CardActionArea>!
  • Do not use tabIndex or onClick to make a regular Card interactive. Use <ClickableCard> instead.
  • When using the active variant, make sure to also include another visual cue such as an icon or text that tells the user if the card is selected or unselected. The green frame does not have enough contrast. Refer to the Selectable Card story.
  • Parameters

    • props: Omit<Props, "ref"> & RefAttributes<HTMLDivElement>

    Returns ReactNode

Properties

$$typeof: symbol
defaultProps?: Partial<Omit<Props, "ref"> & RefAttributes<HTMLDivElement>>
displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.

propTypes?: WeakValidationMap<Omit<Props, "ref"> & RefAttributes<HTMLDivElement>>