Leave Yamada UI a star

Star
Yamada UIYamada UIv1.5.1

SegmentedControl

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

Source@yamada-ui/segmented-control

Props

SegmentedControlProps

colorScheme

Description

The visual color appearance of the component.

Type

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

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

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>

Edit this page on GitHub

PreviousRatingNextData Display