ChoisSTANDARD UI컴포넌트 검색 /

Forms

Form Field

semantic HTML

레이블, 도움말, 오류 메시지를 입력과 연결합니다.

stablefreeSince 0.2

Live example

<div data-standard-component="form-field" label="Work email" hint="We will only use this for account notices.">
  <input type="email" value="[email protected]">
</div>

Variants and sizes

The pattern inherits theme and density tokens. Use compact, comfortable, or roomy density when the surrounding screen requires it.

compactcomfortableroomy

Public API

ContractValue
Implementationsemantic HTML
Statusstable
Licensefree
Since0.2
HTML contractNative HTML elements and attributes
EventsNative browser events

Accessibility

label은 slotted control의 accessible name으로 적용되고 error가 있을 때 aria-invalid와 alert 메시지가 함께 제공됩니다.

Server template guidance

<!-- Render the semantic HTML on the server. Load enhancement JavaScript only when this interaction is needed. -->