React

Select Box

A UI element that uses a container with clear borders to select one or more options from a defined list.

Available since@seed-design/react@0.0.1, @seed-design/css@0.0.1

Installation

npx @seed-design/cli@latest add ui:select-box

Props

Check Select Box

CheckSelectBoxGroup

Prop

Type

label?React.ReactNode
indicator?React.ReactNode
showRequiredIndicator?boolean | undefined
description?React.ReactNode
errorMessage?React.ReactNode

CheckSelectBox

Prop

Type

labelReact.ReactNode
description?React.ReactNode
prefixIcon?React.ReactNode
suffix?React.ReactNode
inputProps?React.InputHTMLAttributes<HTMLInputElement> | undefined
rootRef?React.Ref<HTMLLabelElement> | undefined
disabled?boolean | undefined
invalid?boolean | undefined
required?boolean | undefined
checked?boolean | undefined
defaultChecked?boolean | undefined
onCheckedChange?((checked: boolean) => void) | undefined
indeterminate?boolean | undefined

CheckSelectBoxCheckmark

Prop

Type

Radio Select Box

RadioSelectBoxRoot

Prop

Type

label?React.ReactNode
indicator?React.ReactNode
showRequiredIndicator?boolean | undefined
description?React.ReactNode
errorMessage?React.ReactNode
name?string | undefined
form?string | undefined
value?string | undefined
defaultValue?string | undefined
onValueChange?((value: string) => void) | undefined

RadioSelectBoxItem

Prop

Type

labelReact.ReactNode
description?React.ReactNode
prefixIcon?React.ReactNode
suffix?React.ReactNode
inputProps?React.InputHTMLAttributes<HTMLInputElement> | undefined
rootRef?React.Ref<HTMLLabelElement> | undefined
disabled?boolean | undefined
valuestring

RadioSelectBoxRadiomark

Prop

Type

Examples

React Hook Form

Customizing Label

Listening to Value Changes

CheckSelectBox can detect checkbox selection state changes using onCheckedChange.

RadioSelectBoxRoot can detect radio button selection value changes using onValueChange.

Grid Layout (Columns)

You can arrange items in multiple columns using the columns prop. If columns is greater than 1, the layout of child elements is automatically set to "vertical".

If needed, you can override the layout of individual items by directly setting the layout prop.

With Suffix

You can display checkmarks, radio marks, or custom elements using the suffix prop. You can use CheckSelectBoxCheckmark and RadioSelectBoxRadiomark, or pass free-form elements like icons or text.

You can display additional content using the footer prop. You can control the footer display conditions using the footerVisibility prop.

  • "when-selected" (default): Displayed only when an item is selected
  • "when-not-selected": Displayed only when an item is not selected
  • "always": Always displayed

Fieldset/RadioGroupField Integration

Fieldset/RadioGroupField-related props are available.

  • label and labelWeight
  • indicator and showRequiredIndicator
  • description and errorMessage
  • disabled, invalid, name, form: Only supported on RadioSelectBoxRoot.

Table of contents