SelectCard API

API reference docs for theSelectCardcomponent. For examples and details on the usage of this component, visit the component demo page.

Props

PropTypeDescriptionDefault
controlType?'checkbox' | 'radio'The type of input element to render in each card.radio
isDisabled?booleanMakes all cards in the group disabled. The checkbox / radio will be announced as disabled to screen-readers and styled to signify this.false
legend?React.ReactNodeThe text description of the fieldset element. Renders the passed ReactNode as the first child of the fieldset, inside a <legend> element_
onChange(value: string | string[]) => voidCallback to be called when the selected card(s) state changes._
optionsSelectCardOptionProps[]An array of options(objects) to be rendered._
orientation?'horizontal' | 'vertical'Indicates whether the element's orientation is horizontal, vertical.horizontal
valuestring[] | stringThe value(s) of the selected card(s)._

Note: For SelectCardOptionProps object please refer to the table below.

PropTypeDescriptionDefault
id?stringDefines an identifier (ID) which must be unique.undefined
directSlotReact.ReactNodeBlock of component to display after Radio or Checkbox, in same flex row._
dynamicSlot?React.ReactNodeThe Block of component to display below CardRow, will be visible only when option is checked._
isDisabled?booleanWhen true, the checkbox / radio will be announced as disabled to screen-readers and styled to signify this._
name?stringThe name of the option. Forwarded to CheckBox or Radio input internally._
transitionHeightClass?stringPass css classNames as string to transition height of expanded dynamic contents. When not passed there will not be any transition. Note: When passed container will not grow more than passed height as it has overflow-hiddenhorizontal
valuestringThe value of the option. Forwarded to CheckBox or Radio input internally._