FormTextField
TextField
テキスト入力フィールドコンポーネント
概要
テキスト入力フィールド。type="password" 指定時はパスワード表示/非表示のトグルボタンが表示される。
Props
| Prop | 型 | 必須 | 説明 |
|---|---|---|---|
label | string | Yes | フィールドラベル |
description | string | — | ヘルパーテキスト |
error | string | — | エラーメッセージ |
type | string | — | 入力タイプ("password" でトグル付き) |
...rest | ComponentProps<"input"> | — | ネイティブ input の属性 |
使用例
import { TextField } from "@unitto/ui";
<TextField label="メールアドレス" type="email" placeholder="user@example.com" />
<TextField label="パスワード" type="password" />
<TextField label="名前" error="名前は必須です" />
<TextField label="備考" description="任意入力です" />