zalify-ui

Segment Group

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

React

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.

React

Fitted

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

React

Vertical

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

React

Icon

Use icons inside the segmented group items.

React

Props

Root

Item