Control segmentado con un selector de goma elástica.
npx shadcn@latest add https://reactbits.dev/r/RubberSegment-TS-TW
Para acciones frecuentes: confirmar, marcar, valorar. El feedback convierte un clic en una sensación.
| Prop | Tipo | Por defecto |
|---|---|---|
| items | (string | { value: string; label: ReactNode; icon?: ReactNode })[] | - |
| value | string | undefined |
| defaultValue | string | undefined |
| onChange | (value: string, index: number) => void | - |
| trackColor | string | "#27272a" |
| thumbColor | string | "#fafafa" |
| textColor | string | "#fafafa" |
| activeTextColor | string | "#18181b" |
| size | "sm" | "md" | "lg" | "md" |
| radius | number | 10 |
| inset | number | 3 |
| equalSlots | boolean | true |
| stretch | number | 100 |
| squash | number | 3 |
| speed | number | 1 |
| glide | number | 75 |
| draggable | boolean | true |
| disabled | boolean | false |
| className | string | "" |
| aria-label | string | "Segmented control" |