Skip to main content
For development, import SelectCard from @servicetitan/anvil2. For design, find it in the Anvil2 file.

Anatomy

The Select Card consists of six primary elements that work together to create a card-like checkbox or radio with customizable inner content.
SelectCard sub elements, detailed
below
  1. Card surface - The interactive container that responds to user selection
  2. Inner contents - Customizable content area for labels, descriptions, chips, or other elements
  3. Selected state - Visual indicator showing the card is currently chosen
  4. Errored state - Visual treatment indicating validation or selection errors
  5. Focused state - Visual indicator showing keyboard focus
  6. Focused & selected state - Combined visual treatment for focus and selection

Options

The Select Card supports the following configurations to accommodate various selection scenarios.

States

Default

Selected

Disabled

Errored

Drop Shadows

SelectCard has a drop shadow by default. You can optionally remove it for use in galleries and other dense layouts where shadows may create visual noise.

Select Indicator

Display a checkbox or radio indicator in a separate column on the left side of the card. The indicator type is automatically determined by the selection mode of the parent group.

Behavior

The Select Card responds to user interaction with distinct visual states for selection, error, and focus.

Usage Guidelines

Content

Content within the Select Card should clearly communicate the option being selected. Keep inner content concise and scannable. Use labels, descriptions, chips, or other elements that help users quickly compare options.

Using Drop Shadows

  • In galleries and dense layouts, remove the drop shadow
  • In other contexts, keep the drop shadow for visual separation

Keyboard Interaction

Users can navigate the Select Card using standard keyboard controls.

Accessibility

  • Include Select Cards in a group with a descriptive legend
  • Provide clear, distinct content for each card to help users differentiate options
  • When a Select Card group has an error, include helper text to describe the error

Code

Common Examples

SelectCard Components

The Anvil2 SelectCard is typically used within a SelectCard.Group. Under the hood SelectCard can either be a radio or a checkbox, and accepts all of the props associated with those HTML inputs.
  • SelectCard.Group: the parent component used to configure a group of SelectCard items.
  • SelectCard: used to create a card input to use with a group.

Validation

SelectCards have an errored state, which can be triggered with an onChange.

Select Indicator Visual

Use the showSelectIndicator prop to display a checkbox or radio indicator in a separate column on the left side of the card. The indicator type is automatically determined by the selectionMode from SelectCard.Group.
The showSelectIndicator prop is available for both SelectCard and SelectCard.Group, but in most cases it is recommended to use it with SelectCard.Group to show the indicator on all cards in the group.

Controlled State

Use value on SelectCard.Group to control the selection externally. The component will not update its selection on its own — you must update value in the onChange callback.

Default Selection

Use defaultValue to pre-select cards when the group is uncontrolled. The selection can still be changed by the user after the initial render.
Last modified on October 27, 2026