Label

폼 필드에 대한 접근성 레이블 컴포넌트입니다.

Installation

bash
npx axis-cli add label

Usage

tsx
import { Label } from '@ax/ui'

export function Example() {
  return <Label htmlFor="email">Email</Label>
}

With Input

tsx
import { Input, Label } from '@ax/ui'

export function Example() {
  return (
    <div className="grid w-full max-w-sm items-center gap-1.5">
      <Label htmlFor="email">Email</Label>
      <Input type="email" id="email" placeholder="Enter your email" />
    </div>
  )
}

Props

PropTypeDefaultDescription
htmlForstring-연결할 input의 id
classNamestring-추가 CSS 클래스