Carregando…
Carregando…
Carregando…Pill-style option selector with sliding active indicator and 3 sizes.
$ npx kikitocn add segmented-control@/lib/utilsimport { SegmentedControl } from "@/components/ui/cn/segmented-control/SegmentedControl";
export function SegmentedControlExample() {
return (
<SegmentedControl />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
options* | SegmentedControlOption[] | — | Lista de opções: { value, label, disabled? } |
value | string | undefined | Opção selecionada (controlled) |
defaultValue | string | undefined | Opção inicial (uncontrolled) |
onChange | (value: string) => void | undefined | Callback quando a seleção muda |
size | 'sm' | 'md' | 'lg' | 'md' | Tamanho dos segmentos |
fullWidth | boolean | false | Expande para 100% da largura |
Controlled segmented control
Active: list
sm · md · lg
stretch