텍스트 입력 필드
텍스트 입력 필드는 사용자가 키보드로 글자, 숫자, 기호 등이 조합된 한 줄의 짧은 텍스트를 입력하는 경우에 사용하는 요소이다.
텍스트 입력 필드는 사용자가 키보드로 글자, 숫자, 기호 등이 조합된 한 줄의 짧은 텍스트를 입력하는 경우에 사용하는 요소이다.
사용 지침
이름·아이디·검색어 같은 짧은 입력에 사용하고, 라벨·플레이스홀더·오류 메시지·아이콘을 일관된 위치에 배치해 폼 흐름을 예측 가능하게 만듭니다.
예제
Default
도움말
Sizes
도움말
도움말
도움말
States
도움말
에러 메시지
성공 메시지
정보 메시지
도움말
도움말
With Password Toggle
With Clear Button
With Multiple Buttons
Controlled
현재 값: 제어된 입력
Uncontrolled
비제어 상태로 동작합니다
Without Label
레이블 없이도 사용할 수 있습니다
Without Hint
속성
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
| aria-label | string | — | Defines a string value that labels the current element. @see aria-labelledby. |
| className | string | — | — |
| defaultValue | string | — | — |
| disabled | boolean | — | — |
| error | ReactNode | — | — |
| hint | ReactNode | — | — |
| id | string | — | — |
| information | ReactNode | — | — |
| label | string | — | — |
| onChange | ((value: string) => void) | — | — |
| onClick | MouseEventHandler<HTMLInputElement> | — | — |
| showClearButton | boolean | false | — |
| showPasswordToggle | boolean | false | — |
| size | enum | large | — |
| style | CSSProperties | — | — |
| success | ReactNode | — | — |
| tabIndex | number | — | — |
| type | HTMLInputTypeAttribute | — | — |
| value | string | — | — |