Appearance
ToggleGroup
Nhóm toggle (single hoặc multiple).
ts
import { ToggleGroup, ToggleGroupItem } from "@minap/ui";Examples
Mẫu sống trong Preview; chọn View code khi cần copy.
Usage
tsx
import { ToggleGroup, ToggleGroupItem } from "@minap/ui";
export function Example() {
return (
<>
<ToggleGroup type="single" defaultValue="a">
<ToggleGroupItem value="a">A</ToggleGroupItem>
<ToggleGroupItem value="b">B</ToggleGroupItem>
</ToggleGroup>
</>
);
}Props / API
| Prop / API | Type | Default | Notes |
|---|---|---|---|
type | "single" | "multiple" | — | Bắt buộc |
value / defaultValue | string | string[] | — | |
ToggleGroupItem.value | string | — |
Behavior
- Dùng chung style của Toggle