Input
Basic
jui-input の最も基本的な使用例です。
Usage
コンポーネントの基本的な使用方法です。
Input Types
States
is-disabled などのプロパティを使用してコンポーネントの状態(非活性など)を制御します。
With Icons
スロットなどを利用して、アイコン付きのパターンを作成できます。
概要 (Overview)
jui-input — テキスト入力コンポーネント
ラベル、エラーメッセージ、prefix / suffix スロットに対応。
プロパティ (Properties)
コンポーネントが受け付ける属性(Props)の一覧と詳細仕様です。
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
autocomplete | autocomplete | オートコンプリート属性 | string | undefined |
errorMessage | error-message | エラーメッセージ(表示すると invalid 状態になる) | string | undefined |
inputType | input-type | 入力タイプ | "email" | "number" | "password" | "tel" | "text" | "url" | 'text' |
isDisabled | is-disabled | 無効状態 | boolean | false |
isRequired | is-required | 必須フラグ | boolean | false |
label | label | ラベルテキスト | string | undefined |
maxlength | maxlength | 最大文字数 | number | undefined |
name | name | フォーム送信時の name 属性 | string | undefined |
placeholder | placeholder | プレースホルダー | string | '' |
value | value | 入力値(双方向バインディング用) | string | '' |
イベント (Events)
コンポーネントから発火するカスタムイベントの一覧です。
| Event | Description | Type |
|---|---|---|
juiChange | 変更確定時に発火(value を emit) | CustomEvent<string> |
juiInput | 入力中にリアルタイムで発火(value を emit) | CustomEvent<string> |
スロット (Slots)
コンポーネント内に子要素を挿入するためのスロット一覧です。
| Slot | Description |
|---|---|
"prefix" | 入力フィールド前のアイコン等 |
"suffix" | 入力フィールド後のアイコン等 |
シャドウパーツ (Shadow Parts)
CSSから直接スタイリング可能な内部要素(Parts)の一覧です。
| Part | Description |
|---|---|
"error" | エラーメッセージ |
"field" | 要素 |
"label" | ラベル要素 |
"wrapper" | 入力フィールドを囲むコンテナ |
Built with StencilJS