다른 컴포넌트 보기
COMPONENT / 탐색
ToggleGroup
여러 상태를 묶어서 선택.
PLAYGROUND
사용 코드
import { useState } from 'react';
import * as W from 'woosign-system';
// ThemeProvider와 ToastProvider 안에서 렌더링하세요.
export function Example() {
const [many, setMany] = useState<readonly string[]>([]);
return (
<W.ToggleGroup
label="텍스트 스타일"
items={[
{ value: 'bold', label: '굵게' },
{ value: 'italic', label: '기울임' },
]}
value={many}
onValueChange={setMany}
multiple
disabled={false}
/>
);
}
API
타입 정의 ↗| Prop | Type | 필수 |
|---|---|---|
items | readonly {value: string; label: string; disabled?: boolean}[] | ● |
value | readonly string[] | — |
defaultValue | readonly string[] | — |
onValueChange | (value: readonly string[]) => void | — |
multiple | boolean | — |
disabled | boolean | — |
label | string | ● |
공통 API 기준입니다. 플랫폼별 style, className 및 세부 타입은 타입 정의에서 확인하세요.
← 전체 컴포넌트로 돌아가기