Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

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

disabled

Description

If true, the segmented control will be disabled.

Type

boolean

Default

false

isDisabled

Deprecated

Description

If true, the segmented control will be disabled.

Deprecated

Use disabled instead.

Type

boolean

Default

false

isReadOnly

Deprecated

Description

If true, the segmented control will be readonly.

Deprecated

Use readOnly instead.

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>

readOnly

Description

If true, the segmented control will be readonly.

Type

boolean

Default

false

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

disabled

Description

If true, the segmented control will be disabled.

Type

boolean

Default

false

isDisabled

Deprecated

Description

If true, the segmented control will be disabled.

Deprecated

Use disabled instead.

Type

boolean

Default

false

isReadOnly

Deprecated

Description

If true, the segmented control will be readonly.

Deprecated

Use readOnly instead.

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

readOnly

Description

If true, the segmented control will be readonly.

Type

boolean

Default

false

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