데이터 입력Switch20 props
Switch
Switch는 저장 버튼 없이 즉시 적용되는 on/off 설정을 제공합니다.
공식 문서 열기미리보기
This setting applies immediately.
This demo keeps the setting locked.
Import
import {Switch} from '@astryxdesign/core/Switch';Astryx 문서 권장 방식대로 root barrel이 아니라 컴포넌트 subpath에서 가져옵니다.
사용 시점
Switch는 저장 버튼 없이 즉시 적용되는 on/off 설정을 제공합니다.
switchtoggleonoffflipswitchbooleantoggleswitch
중요 props
changeAction(checked: boolean, e: ChangeEvent<HTMLInputElement>) => void | Promise<void>optional
labelPositionstart | endoptional
labelSpacingdefault | spreadoptional
테마 대상
astryx-switchastryx-switch-thumbastryx-switch-field
사용 지침
- 권장Switch의 목적이 드러나도록 레이블과 보조 설명을 함께 제공하세요.
- 권장상태 변화가 필요한 경우 사용자가 바로 이해할 수 있는 피드백을 연결하세요.
- 피하기컴포넌트의 기본 상호작용을 우회해 키보드 흐름을 깨뜨리지 마세요.
- 피하기공간을 줄이기 위해 필요한 레이블이나 설명을 제거하지 마세요.