rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

ToggleGroup

Set of related toggle buttons allowing single or multiple selection within the group.

Examples

Text alignment

Single-select group for text alignment.

View mode

Grid / List toggle with icon symbols.

With icons (multi-select)

Format toolbar supporting multiple active states at once.

Single select (pill)

Segmented control style. Moving highlight indicates selection.

Installation

pnpm add @rokle/components @rokle/tokens

Installs with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.

Usage

import { ToggleGroup } from "@rokle/components";
import { ToggleGroup } from "@rokle/components";

export function Example() {
  return <ToggleGroup />;
}

API Reference

PropTypeDefaultDescription
items{ label: string; value: string; icon?: ReactNode }[]-Toggle group items.
valuestring | string[]-Selected value or values.
type"single" | "multiple""single"Whether one or multiple items can be active.