Park UI

Segment Group

A form input component for selecting one option from a segmented control.

Installation

Usage

Shortcuts

The SegmentGroup component also provides a set of shortcuts for common use cases.

SegmentGroupItems

The SegmentGroup.Items shortcut renders a list of items based on the items prop:

This might be more concise, if you don't need to customize the items:

Examples

Sizes

Use the size prop to change the size of the segmented group.

Fitted

Use the fitted prop to make the tabs fit the width of the container.

Vertical

By default, the segmented control is horizontal. Set the orientation prop to vertical to change the orientation of the segmented group.

Icon

Use icons inside the segmented group items.

Props

Root

Item