Leave Yamada UI a star

Star
Yamada UIYamada UIv1.6.4

SegmentedControl

SegmentedControl is a component used for allowing users to select one option from multiple choices.

Source@yamada-ui/segmented-control

Props

SegmentedControlButtonProps

value

Required

Description

The value of the segmented control button.

Type

string

isDisabled

Description

If true, the segmented control will be disabled.

Type

boolean

Default

false

isReadOnly

Description

If true, the segmented control will be readonly.

Type

boolean

Default

false

motionProps

Description

Props for motion component.

Type

MotionProps

onChange

Description

The callback fired when any children radio is checked or unchecked.

Type

ChangeEventHandler<HTMLInputElement>

SegmentedControlProps

colorScheme

Description

The visual color appearance of the component.

Type

"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"

defaultValue

Description

The initial value of the segmented control.

Type

string

isDisabled

Description

If true, the segmented control will be disabled.

Type

boolean

Default

false

isReadOnly

Description

If true, the segmented control will be readonly.

Type

boolean

Default

false

items

Description

If provided, generate segmented control buttons but based on items.

Type

SegmentedControlItem[]

Default

'[]'

name

Description

The HTML name attribute used for forms.

Type

string

onChange

Description

The callback fired when any children radio is checked or unchecked.

Type

(value: string) => void

size

Description

The size of the SegmentedControl.

Type

"sm" | "md" | "lg"

Default

"md"

value

Description

The value of the segmented control.

Type

string

variant

Description

The variant of the SegmentedControl.

Type

"basic" | "rounded"

Default

"basic"

Edit this page on GitHub

PreviousRatingNextData Display