본문으로 건너뛰기

구성 요소

입력

일반적인 입력 유형을 모두 지원하는 한 줄 텍스트 필드입니다.

사용법

기본

HTML
<bs:bsui-input placeholder="Project name" />

유형

유형에 따라 브라우저가 적용하는 키보드 동작과 유효성 검사가 결정됩니다.

HTML
<bs:bsui-stack direction="column" gap="3" align="stretch">
  <bs:bsui-input type="email" placeholder="ada@example.com" />
  <bs:bsui-input type="url" placeholder="https://acme.com" />
  <bs:bsui-input type="tel" placeholder="+49 30 123456" />
  <bs:bsui-input type="search" placeholder="Search components" />
</bs:bsui-stack>

필수

필수 입력란에는 required 및 aria-required 속성이 설정됩니다.

Required. Pick the repository the deploy runs from.
HTML
<bs:bsui-field>
  <bs:bsui-field-label text="Repository" />
  <bs:bsui-input name="repository" placeholder="acme/website" required="true" />
  <bs:bsui-field-description text="Required. Pick the repository the deploy runs from." />
</bs:bsui-field>

미리 입력됨 및 비활성화됨

기본값과 편집이 꺼진 동일한 값입니다.

HTML
<bs:bsui-stack direction="column" gap="3" align="stretch">
  <bs:bsui-input defaultValue="acme-production" />
  <bs:bsui-input defaultValue="acme-production" disabled="true" />
</bs:bsui-stack>

속성

속성유형기본값
type text email password url tel search text
name text —
placeholder text —
disabled toggle false
required toggle false
defaultValue text —
nameAlt text —
onChange text —
value text —
autocomplete text —