Components

Input

Styled text input field with error message support

Overview

Input is a styled text input field. It supports error message display, full width mode, and disabled state.

  • Variant — Three styles: default, error, success
  • Error Message — Displays error text below the input field via the errorMessage prop
  • Full Width — Takes up the full width of the parent container with isFullWidth

Variants

This field is required

Full Width

Props

PropTypeDefaultRequiredDescription
size'sm' | 'md' | 'lg''md'No크기
variant'default' | 'error' | 'success''default'No상태 표시
isFullWidthbooleantrueNo기본 width가 100%라 생략하면 꽉 찬다. false면 auto
isDisabledbooleanfalseNo비활성 여부
errorMessagestring-No오류 문구. 지금은 aria-describedby로 입력창과 연결되지 않는다
valuestring''''No값 (제어 컴포넌트)
onChange(e: ChangeEvent<HTMLInputElement>) => void-No값이 바뀔 때
typestring''text''Noinput type
namestring''''Noinput name
classNamestring-No추가 CSS 클래스
refRef<HTMLInputElement>-Noinput 엘리먼트 ref

Specification

base

상태요소속성값
enabledrootcolor$color.text.default.default
enabledrootbackgroundColor$color.background.default.default
enabledrootborderColor$color.background.default.default
enabledrootborderWidth$size.stroke.border
enabledrootborderRadius$size.radius.100
enabledrootpadding$size.space.200
enabledroottypography$text.bodyStrong
enablederrorTextcolor$color.text.danger.default
enablederrorTexttypography$text.caption
enablederrorTextmarginTop$size.space.100

variant=default

상태요소속성값
hoverrootborderColor$color.border.default.default
focusrootstrokeWidth$size.stroke.focus
focusrootstrokeColor$color.border.brand.default
focusrootoutlineStylenone토큰 아님 — 테두리가 포커스 표시를 대신함
disabledrootcolor$color.text.disabled.default

Guidelines

  • When in error state, use variant="error" together with errorMessage
  • Use isFullWidth in forms to maintain a consistent layout