入力フィールド
背景面より一段くぼんだテキスト入力フィールド。ラベル、ヒント、エラー、グループに対応します。
このページの内容
テキスト入力フィールドは背景面より一段くぼんで見え、0.5pxの輪郭で縁取られます。フォーカス時はシートと同じ高さに見え、前景色の輪郭線1本と、その外側の柔らかな光で強調されます。<input>と<textarea>には.inputを、フィールドを囲む<label>には.fieldを指定します。
入力フィールド
<label class="field"> Email <input class="input" type="email" autocomplete="email" placeholder="you@example.com"></label><label className="field"> Email <input className="input" type="email" autoComplete="email" placeholder="you@example.com" /></label><label class="field"> Email <input class="input" type="email" autocomplete="email" placeholder="you@example.com"></label><template> <label class="field"> Email <input class="input" type="email" autocomplete="email" placeholder="you@example.com"> </label></template>#ヒントとエラー
aria-describedbyでヒントやエラーをフィールドに関連付け、値が無効な場合はaria-invalid="true"を指定します。field-errorはフィールドが無効な間だけヒントに代わって表示されるため、ヒントとエラーの両方を最初からマークアップに含められます。
ヒントとエラー
<div class="field"> <label for="project-name">Project name</label> <input class="input" id="project-name" value="atlas" aria-describedby="name-hint"> <span class="field-hint" id="name-hint">Lowercase letters, numbers and dashes.</span></div><div class="field"> <label for="project-domain">Domain</label> <input class="input" id="project-domain" value="atlas" aria-invalid="true" aria-describedby="domain-error"> <span class="field-error" id="domain-error">Enter a full domain, such as atlas.dev.</span></div><> <div className="field"> <label htmlFor="project-name">Project name</label> <input className="input" id="project-name" defaultValue="atlas" aria-describedby="name-hint" /> <span className="field-hint" id="name-hint">Lowercase letters, numbers and dashes.</span> </div> <div className="field"> <label htmlFor="project-domain">Domain</label> <input className="input" id="project-domain" defaultValue="atlas" aria-invalid="true" aria-describedby="domain-error" /> <span className="field-error" id="domain-error">Enter a full domain, such as atlas.dev.</span> </div></><div class="field"> <label for="project-name">Project name</label> <input class="input" id="project-name" value="atlas" aria-describedby="name-hint"> <span class="field-hint" id="name-hint">Lowercase letters, numbers and dashes.</span></div><div class="field"> <label for="project-domain">Domain</label> <input class="input" id="project-domain" value="atlas" aria-invalid="true" aria-describedby="domain-error"> <span class="field-error" id="domain-error">Enter a full domain, such as atlas.dev.</span></div><template> <div class="field"> <label for="project-name">Project name</label> <input class="input" id="project-name" value="atlas" aria-describedby="name-hint"> <span class="field-hint" id="name-hint">Lowercase letters, numbers and dashes.</span> </div> <div class="field"> <label for="project-domain">Domain</label> <input class="input" id="project-domain" value="atlas" aria-invalid="true" aria-describedby="domain-error"> <span class="field-error" id="domain-error">Enter a full domain, such as atlas.dev.</span> </div></template>#ブラウザー標準の入力検証
ブラウザー標準の制約でも、スクリプトなしで同じ状態表示が適用されます。required、type、またはpatternのあるフィールドが:user-invalidにマッチすると、エラー時の輪郭が表示されます。フォームの初期表示ではマッチせず、利用者がフィールドを編集するか送信を試みた後にだけマッチします。輪郭とともにfield-errorも表示されます。
ブラウザー標準の入力検証
<form class="flex flex-col gap-md"> <div class="field"> <label for="work-email">Work email</label> <input class="input" id="work-email" type="email" autocomplete="work email" required placeholder="you@company.com" aria-describedby="work-email-hint work-email-error"> <span class="field-hint" id="work-email-hint"> Type something that is not an email, then leave the field. </span> <span class="field-error" id="work-email-error"> Enter an email address, such as ada@example.com. </span> </div> <button type="submit" class="btn btn-primary self-start">Continue</button></form><form className="flex flex-col gap-md"> <div className="field"> <label htmlFor="work-email">Work email</label> <input className="input" id="work-email" type="email" autoComplete="work email" required placeholder="you@company.com" aria-describedby="work-email-hint work-email-error" /> <span className="field-hint" id="work-email-hint"> Type something that is not an email, then leave the field. </span> <span className="field-error" id="work-email-error"> Enter an email address, such as ada@example.com. </span> </div> <button type="submit" className="btn btn-primary self-start">Continue</button></form><form class="flex flex-col gap-md"> <div class="field"> <label for="work-email">Work email</label> <input class="input" id="work-email" type="email" autocomplete="work email" required placeholder="you@company.com" aria-describedby="work-email-hint work-email-error"> <span class="field-hint" id="work-email-hint"> Type something that is not an email, then leave the field. </span> <span class="field-error" id="work-email-error"> Enter an email address, such as ada@example.com. </span> </div> <button type="submit" class="btn btn-primary self-start">Continue</button></form><template> <form class="flex flex-col gap-md"> <div class="field"> <label for="work-email">Work email</label> <input class="input" id="work-email" type="email" autocomplete="work email" required placeholder="you@company.com" aria-describedby="work-email-hint work-email-error"> <span class="field-hint" id="work-email-hint"> Type something that is not an email, then leave the field. </span> <span class="field-error" id="work-email-error"> Enter an email address, such as ada@example.com. </span> </div> <button type="submit" class="btn btn-primary self-start">Continue</button> </form></template>#サイズ
フィールドの高さは32px、38px、44pxの3種類です。ボタン、セレクト、セグメントコントロールと高さが揃っているため、マウスでも指でも、同じ行に段差なく並べられます。タッチスクリーンでもフィールドの高さと文字サイズは変わりません。フォーカス時のiOSの拡大は、ページのビューポートで防ぎます。
サイズ
<input class="input input-sm" placeholder="Small" aria-label="Small"><input class="input" placeholder="Medium" aria-label="Medium"><input class="input input-lg" placeholder="Large" aria-label="Large"><> <input className="input input-sm" placeholder="Small" aria-label="Small" /> <input className="input" placeholder="Medium" aria-label="Medium" /> <input className="input input-lg" placeholder="Large" aria-label="Large" /></><input class="input input-sm" placeholder="Small" aria-label="Small"><input class="input" placeholder="Medium" aria-label="Medium"><input class="input input-lg" placeholder="Large" aria-label="Large"><template> <input class="input input-sm" placeholder="Small" aria-label="Small"> <input class="input" placeholder="Medium" aria-label="Medium"> <input class="input input-lg" placeholder="Large" aria-label="Large"></template>#テキストエリア
.inputを指定した<textarea>では、指定した行数と、高さを調整するリサイズハンドルが保たれます。内容に合わせて高さを変えるにはinput-autoを追加します。field-sizing: contentによって3行から最大12行まで伸び、それ以降はスクロールします。範囲を変えるには--input-rowsと--input-max-rowsを設定します。field-sizingに対応していないブラウザーでは、最小の高さとリサイズハンドルが保たれます。
テキストエリア
<label class="field"> Message <textarea class="input" rows="3" placeholder="A fixed height with a resize handle"></textarea></label><label class="field"> Notes <textarea class="input input-auto" placeholder="Keep typing: this one grows with its content"></textarea></label><> <label className="field"> Message <textarea className="input" rows={3} placeholder="A fixed height with a resize handle">{``}</textarea> </label> <label className="field"> Notes <textarea className="input input-auto" placeholder="Keep typing: this one grows with its content">{``}</textarea> </label></><label class="field"> Message <textarea class="input" rows="3" placeholder="A fixed height with a resize handle"></textarea></label><label class="field"> Notes <textarea class="input input-auto" placeholder="Keep typing: this one grows with its content"></textarea></label><template> <label class="field"> Message <textarea class="input" rows="3" placeholder="A fixed height with a resize handle"></textarea> </label> <label class="field"> Notes <textarea class="input input-auto" placeholder="Keep typing: this one grows with its content"></textarea> </label></template>#入力グループ
input-groupは、枠のないフィールドと、アイコン、単位、ショートカット、ボタンなどの関連要素を、くぼんだ1つの枠にまとめます。グループは:has()を通じて、内部フィールドのホバー、フォーカス、無効な値、操作不可の各状態を表示します。フィールド自体はinput-group-fieldで、セマンティクスとキャレットを保ちます。枠全体からフィールドにフォーカスできるように、グループには<label>を使います。
入力グループ
<label class="input-group"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="7" cy="7" r="4.5" /><path d="M10.182 10.182L14 14" /> </svg> <input class="input-group-field" type="search" placeholder="Search projects" aria-label="Search projects"> <kbd class="kbd">⌘K</kbd></label><label class="input-group"> <span class="input-group-addon">https://</span> <input class="input-group-field" value="atlas" aria-label="Subdomain"> <span class="input-group-addon">.master.co</span></label><label class="input-group"> <input class="input-group-field" type="number" value="24" aria-label="Timeout"> <span class="input-group-addon">seconds</span></label>import SearchIcon from '@master/icons-react/native/16/soft/search'<> <label className="input-group"> <SearchIcon className="icon" /> <input className="input-group-field" type="search" placeholder="Search projects" aria-label="Search projects" /> <kbd className="kbd">⌘K</kbd> </label> <label className="input-group"> <span className="input-group-addon">https://</span> <input className="input-group-field" defaultValue="atlas" aria-label="Subdomain" /> <span className="input-group-addon">.master.co</span> </label> <label className="input-group"> <input className="input-group-field" type="number" defaultValue="24" aria-label="Timeout" /> <span className="input-group-addon">seconds</span> </label></><script> import SearchIcon from '@master/icons-svelte/native/16/soft/search'</script><label class="input-group"> <SearchIcon class="icon" /> <input class="input-group-field" type="search" placeholder="Search projects" aria-label="Search projects"> <kbd class="kbd">⌘K</kbd></label><label class="input-group"> <span class="input-group-addon">https://</span> <input class="input-group-field" value="atlas" aria-label="Subdomain"> <span class="input-group-addon">.master.co</span></label><label class="input-group"> <input class="input-group-field" type="number" value="24" aria-label="Timeout"> <span class="input-group-addon">seconds</span></label><script setup>import SearchIcon from '@master/icons-vue/native/16/soft/search'</script><template> <label class="input-group"> <SearchIcon class="icon" /> <input class="input-group-field" type="search" placeholder="Search projects" aria-label="Search projects"> <kbd class="kbd">⌘K</kbd> </label> <label class="input-group"> <span class="input-group-addon">https://</span> <input class="input-group-field" value="atlas" aria-label="Subdomain"> <span class="input-group-addon">.master.co</span> </label> <label class="input-group"> <input class="input-group-field" type="number" value="24" aria-label="Timeout"> <span class="input-group-addon">seconds</span> </label></template>グループ内のボタンは枠の縁から4px内側に配置され、角の半径も枠より4px小さくなります。どのサイズでも、枠とボタンの対応する角は同じ中心を持ちます。ボタンを含むグループには<div>を使います。
ボタン付き
<form class="input-group"> <input class="input-group-field" type="email" autocomplete="email" placeholder="you@example.com" aria-label="Email"> <button type="submit" class="btn btn-primary">Subscribe</button></form><div class="input-group input-group-sm"> <input class="input-group-field" value="https://atlas.dev/p/9f2c" readonly aria-label="Share link"> <button type="button" class="btn">Copy</button></div><> <form className="input-group"> <input className="input-group-field" type="email" autoComplete="email" placeholder="you@example.com" aria-label="Email" /> <button type="submit" className="btn btn-primary">Subscribe</button> </form> <div className="input-group input-group-sm"> <input className="input-group-field" defaultValue="https://atlas.dev/p/9f2c" readOnly aria-label="Share link" /> <button type="button" className="btn">Copy</button> </div></><form class="input-group"> <input class="input-group-field" type="email" autocomplete="email" placeholder="you@example.com" aria-label="Email"> <button type="submit" class="btn btn-primary">Subscribe</button></form><div class="input-group input-group-sm"> <input class="input-group-field" value="https://atlas.dev/p/9f2c" readonly aria-label="Share link"> <button type="button" class="btn">Copy</button></div><template> <form class="input-group"> <input class="input-group-field" type="email" autocomplete="email" placeholder="you@example.com" aria-label="Email"> <button type="submit" class="btn btn-primary">Subscribe</button> </form> <div class="input-group input-group-sm"> <input class="input-group-field" value="https://atlas.dev/p/9f2c" readonly aria-label="Share link"> <button type="button" class="btn">Copy</button> </div></template>フィールドとボタンを分けて配置する場合は、<form class="flex gap-xs">で横並びのフレックスコンテナーに入れます。
#複数の値
input-group-wrapを使うと、グループが宛先やタグ、フィルターなどを複数入力できるフィールドになります。各値は入力枠内にチップとして並び、入力欄は最終行の残り幅を使います。値が収まらなくなると行が追加され、入力枠の高さが1行分増えます。チップは枠の端から6px内側に置かれ、枠と同心になるように角を丸めます。
値の配置はスタイルシートが担います。タグ入力はEnterで値を追加します。空のフィールドでBackspaceを押すと最後の値に移動し、もう一度押すとその値を削除します。複数の値を選べるコンボボックスでは、値をリストから選びます。
複数の値
<div class="field max-w(420) mx-auto"> <label for="input-teams">Teams</label> <div class="input-group input-group-wrap"> <span class="chip"> Design<button type="button" class="chip-remove" aria-label="Remove Design"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button> </span> <span class="chip"> Research<button type="button" class="chip-remove" aria-label="Remove Research"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button> </span> <span class="chip"> Engineering<button type="button" class="chip-remove" aria-label="Remove Engineering"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button> </span> <span class="chip"> Operations<button type="button" class="chip-remove" aria-label="Remove Operations"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button> </span> <input class="input-group-field" id="input-teams" placeholder="Add a team"> </div></div>import XIcon from '@master/icons-react/native/16/soft/x'<div className="field max-w(420) mx-auto"> <label htmlFor="input-teams">Teams</label> <div className="input-group input-group-wrap"> <span className="chip"> Design<button type="button" className="chip-remove" aria-label="Remove Design"> <XIcon className="icon" /> </button> </span> <span className="chip"> Research<button type="button" className="chip-remove" aria-label="Remove Research"> <XIcon className="icon" /> </button> </span> <span className="chip"> Engineering<button type="button" className="chip-remove" aria-label="Remove Engineering"> <XIcon className="icon" /> </button> </span> <span className="chip"> Operations<button type="button" className="chip-remove" aria-label="Remove Operations"> <XIcon className="icon" /> </button> </span> <input className="input-group-field" id="input-teams" placeholder="Add a team" /> </div></div><script> import XIcon from '@master/icons-svelte/native/16/soft/x'</script><div class="field max-w(420) mx-auto"> <label for="input-teams">Teams</label> <div class="input-group input-group-wrap"> <span class="chip"> Design<button type="button" class="chip-remove" aria-label="Remove Design"> <XIcon class="icon" /> </button> </span> <span class="chip"> Research<button type="button" class="chip-remove" aria-label="Remove Research"> <XIcon class="icon" /> </button> </span> <span class="chip"> Engineering<button type="button" class="chip-remove" aria-label="Remove Engineering"> <XIcon class="icon" /> </button> </span> <span class="chip"> Operations<button type="button" class="chip-remove" aria-label="Remove Operations"> <XIcon class="icon" /> </button> </span> <input class="input-group-field" id="input-teams" placeholder="Add a team"> </div></div><script setup>import XIcon from '@master/icons-vue/native/16/soft/x'</script><template> <div class="field max-w(420) mx-auto"> <label for="input-teams">Teams</label> <div class="input-group input-group-wrap"> <span class="chip"> Design<button type="button" class="chip-remove" aria-label="Remove Design"> <XIcon class="icon" /> </button> </span> <span class="chip"> Research<button type="button" class="chip-remove" aria-label="Remove Research"> <XIcon class="icon" /> </button> </span> <span class="chip"> Engineering<button type="button" class="chip-remove" aria-label="Remove Engineering"> <XIcon class="icon" /> </button> </span> <span class="chip"> Operations<button type="button" class="chip-remove" aria-label="Remove Operations"> <XIcon class="icon" /> </button> </span> <input class="input-group-field" id="input-teams" placeholder="Add a team"> </div> </div></template>#検索と自動入力
type="search"のフィールドにはブラウザーのクリアボタンが残り、アイコンと同じ色の細い×印で表示されます。ブラウザーが値を自動入力すると、入力枠はブラウザーエンジン固有の黄色や青ではなく、情報色を淡く使った背景になり、入力後もフォーム全体の見た目が揃います。
検索
<input class="input max-w(360) mx-auto" type="search" value="moonstone" aria-label="Search"><input className="input max-w(360) mx-auto" type="search" defaultValue="moonstone" aria-label="Search" /><input class="input max-w(360) mx-auto" type="search" value="moonstone" aria-label="Search"><template> <input class="input max-w(360) mx-auto" type="search" value="moonstone" aria-label="Search"></template>#ファイル
<input type="file">では、ブラウザーのボタンが、セグメントコントロールの選択肢のように、入力枠の底から少し浮き上がった小さなボタンになります。
ファイル
<label class="field">Attachment <input class="input" type="file"></label><label className="field">Attachment <input className="input" type="file" /></label><label class="field">Attachment <input class="input" type="file"></label><template> <label class="field">Attachment <input class="input" type="file"></label></template>#日付・時刻・数値・色
.inputは、ブラウザー標準の日付、時刻、数値、色のフィールドを共通の入力枠で表示します。ピッカーには、ユーザーが端末で使い慣れたプラットフォーム標準のものを使います。色フィールドは正方形になり、色見本は枠の端から4px内側に収まり、枠と同心になるように角が丸まります。
ブラウザーがフィールド内に表示する小さなマークは、アイコンと同じ線の太さと色で描画します。カレンダーや時計はピッカーを開き、上下の山形アイコンは上で数値を増やし、下で減らします。ChromiumとSafariではこれらの部品をスタイル指定できます。Firefoxでは標準の表示が使われます。頻繁に増減する数値には、ステッパーを使います。
日付・時刻・数値・色
<label class="field">Starts <input class="input" type="date" value="2026-11-11"></label><label class="field">At <input class="input" type="time" value="09:30"></label><label class="field"> Timeout in seconds <input class="input" type="number" min="0" step="5" value="30"></label><label class="field">Accent <input class="input" type="color" value="#5b4fe0"></label><> <label className="field"> Starts <input className="input" type="date" defaultValue="2026-11-11" /> </label> <label className="field">At <input className="input" type="time" defaultValue="09:30" /></label> <label className="field"> Timeout in seconds <input className="input" type="number" min="0" step="5" defaultValue="30" /> </label> <label className="field"> Accent <input className="input" type="color" defaultValue="#5b4fe0" /> </label></><label class="field">Starts <input class="input" type="date" value="2026-11-11"></label><label class="field">At <input class="input" type="time" value="09:30"></label><label class="field"> Timeout in seconds <input class="input" type="number" min="0" step="5" value="30"></label><label class="field">Accent <input class="input" type="color" value="#5b4fe0"></label><template> <label class="field">Starts <input class="input" type="date" value="2026-11-11"></label> <label class="field">At <input class="input" type="time" value="09:30"></label> <label class="field"> Timeout in seconds <input class="input" type="number" min="0" step="5" value="30"> </label> <label class="field">Accent <input class="input" type="color" value="#5b4fe0"></label></template>#フィールドセット
<fieldset>にfieldsetを指定すると、ブラウザー既定の溝状の枠線を省き、関連するコントロールを共通の見出しでまとめられます。fieldset-legendを使うと、<legend>がフィールドラベルと同じ見た目になります。チェックボックス、ラジオボタン、選択肢を囲み、グループに名前を付けるために使います。
フィールドセット
<fieldset class="fieldset"> <legend class="fieldset-legend">Notify me about</legend> <label class="check"><input type="checkbox" class="checkbox" checked> Failed deployments</label> <label class="check"> <input type="checkbox" class="checkbox" checked> Expiring certificates </label> <label class="check"><input type="checkbox" class="checkbox"> Product news</label></fieldset><fieldset className="fieldset"> <legend className="fieldset-legend">Notify me about</legend> <label className="check"> <input type="checkbox" className="checkbox" defaultChecked /> Failed deployments </label> <label className="check"> <input type="checkbox" className="checkbox" defaultChecked /> Expiring certificates </label> <label className="check"><input type="checkbox" className="checkbox" /> Product news</label></fieldset><fieldset class="fieldset"> <legend class="fieldset-legend">Notify me about</legend> <label class="check"><input type="checkbox" class="checkbox" checked> Failed deployments</label> <label class="check"> <input type="checkbox" class="checkbox" checked> Expiring certificates </label> <label class="check"><input type="checkbox" class="checkbox"> Product news</label></fieldset><template> <fieldset class="fieldset"> <legend class="fieldset-legend">Notify me about</legend> <label class="check"><input type="checkbox" class="checkbox" checked> Failed deployments</label> <label class="check"> <input type="checkbox" class="checkbox" checked> Expiring certificates </label> <label class="check"><input type="checkbox" class="checkbox"> Product news</label> </fieldset></template>#無効
無効
<div class="field"> <label for="custom-domain">Custom domain</label> <input class="input" id="custom-domain" value="atlas.dev" disabled aria-describedby="custom-domain-reason"> <span class="field-hint" id="custom-domain-reason">Custom domains come with the Team plan.</span></div><div className="field"> <label htmlFor="custom-domain">Custom domain</label> <input className="input" id="custom-domain" defaultValue="atlas.dev" disabled aria-describedby="custom-domain-reason" /> <span className="field-hint" id="custom-domain-reason"> Custom domains come with the Team plan. </span></div><div class="field"> <label for="custom-domain">Custom domain</label> <input class="input" id="custom-domain" value="atlas.dev" disabled aria-describedby="custom-domain-reason"> <span class="field-hint" id="custom-domain-reason">Custom domains come with the Team plan.</span></div><template> <div class="field"> <label for="custom-domain">Custom domain</label> <input class="input" id="custom-domain" value="atlas.dev" disabled aria-describedby="custom-domain-reason"> <span class="field-hint" id="custom-domain-reason"> Custom domains come with the Team plan. </span> </div></template>#React、Svelte、Vue
fieldコンポーネントは、ラベル、コントロール、ヒント、エラーをそれぞれのIDで関連付けます。コントロールにはページ側のマークアップを使います。このページのほかの実装も、すべてマークアップだけで行えます。npx master-ui add fieldでコンポーネントをプロジェクトにコピーできます。構成と使い方はReact、Svelte、Vueを参照してください。
#クラス
| クラス | 説明 |
|---|---|
input | くぼみとして描画するテキスト入力、ファイル入力、textarea。ブラウザーの日付、時刻、数値、検索、色の入力欄にも適用 |
input-sm | 高さは 32px です。既定の高さはボタンと同じ 38px です。input と併用します |
input-lg | 高さは 44px です。既定の高さはボタンと同じ 38px です。input と併用します |
input-auto | 内容に合わせて --input-rows 行から --input-max-rows 行まで広がり、それ以降はスクロールする textareainput と併用します |
input-group | 装飾のないフィールドと、付随するアイコン、アドオン、またはボタンを一つのくぼみで囲みます。内側のフィールドのホバー、フォーカス、入力エラー、無効の各状態を表示します。 |
input-group-sm | 高さ 32px のグループ。既定は 38pxinput-group と併用します |
input-group-lg | 高さ 44px のグループ。既定は 38pxinput-group と併用します |
input-group-wrap | 複数の値をチップとしてまとめ、行が増えるグループ。値の追加と削除は、ページ側のスクリプトまたはサーバーとの往復で処理input-group と併用します |
input-group-field | グループ内の装飾を省いたネイティブ入力フィールド。セマンティクスとキャレットを保持します。 |
input-group-addon | 値の横に置く固定テキスト。プロトコル、単位、ドメインなど |
field | コントロールの上にラベルを重ね、必要に応じて下に補足を置きます。テキストとコントロールだけを含む場合は label 要素を使い、ヒントやエラーがある場合は for 付きの label を含む div を使います。補足がコントロールの名前の一部ではなく説明になるためです。 |
field-hint | コントロールの下に控えめな色で表示する案内。フィールド内ではエラーの表示中に隠れます。 |
field-error | エラーメッセージ。フィールド内のコントロールが入力の検証に失敗している間だけ表示されます。 |
field-help | ラベルの後ろに置く疑問符です。控えめな文字色に点線の下線を引き、ツールチップを表示します。interestfor と popovertarget でそのツールチップを指すボタンです。ラベルと同じ行に並べ、ラベルの中には置きません |
fieldset | 関連するコントロールを1つのキャプションの下にまとめるfieldset。ブラウザー既定の溝状の枠線なし |
fieldset-legend | legend はグループの見出しです。フィールドのラベルと同じスタイルで表示します。 |
#カスタムプロパティ
| プロパティ | 既定値 | 説明 |
|---|---|---|
--input-height | 2.375rem | 入力欄または入力グループのブロック方向の最小サイズ。どのポインターでも同じです |
--input-padding-x | .75rem | 入力欄または入力グループのインライン方向のパディング |
--input-font-size | .875rem | テキストサイズ |
--input-radius | var(--radius-control) | 角の半径は10px。小サイズは8px、大サイズは12px |
--input-rows | 3 | input-auto textarea の最小表示行数。指定先:input-auto |
--input-max-rows | 12 | input-auto textarea がスクロールを始めるまでに伸びる最大行数指定先:input-auto |