Input Number

マイナス/プラスボタン付きの数値フィールド。矢印・Page Up / Down・Home / End で操作する spinbutton で、min と max の範囲に収まります。フォームコントロールとして使えます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 対応

使い方

2 × €24.00 = €48.00

インポート

ts
import {
  SoneInputNumberComponent,
} from "@surface-one/angular/input-number";

API リファレンス

SoneInputNumberComponentコンポーネント

A number field with − and + buttons — a quantity in a cart, a count in a form. The field is a WAI-ARIA spinbutton: ↑ / ↓ step, Page Up / Page Down step × 10, Home / End jump to `min` / `max`; typed text is parsed and clamped on blur or Enter. A ControlValueAccessor of `number | null`, or `[(value)]`.

セレクター
sone-input-number
入力
名前型 デフォルト
value双方向number | nullnull
minnullnull
maxnullnull
stepnumber1
sizeInputNumberSize"default"
placeholderstring""
inputIdstring | nullnull
ariaLabel

The field's accessible name, when no `<label for>` names it.

string | nullnull
disabledbooleanfalse
invalidbooleanfalse
decrementLabel—$localize`:Button that lowers a number field by one step:Decrease`
incrementLabel—$localize`:Button that raises a number field by one step:Increase`