Props
| Name | Description |
|---|---|
append:icon Type: string | Name of the icon to be added at the end of the input. The append position is contested, by priority: clear button → spinner ( |
autocomplete Type: stringDefault"off" | Guides the browser as to the type of information expected in the field. |
autofocus Type: Booleanish | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
clearable Type: booleanDefaultfalse | Displays a clear button when the input has a value and is being interacted with. Emits |
compact Type: booleanDefaultfalse | Compact density: the field uses the The only density knob: this family has no |
currency Type: string | An ISO 4217 code ( Puts the symbol inside the text, where the locale writes it ( |
description Type: string | Text between the label and the input. Unlike the hint it is always visible; it joins the input's For what the user needs before typing. Anything about the acceptable range reads better in |
disabled Type: booleanDefaultfalse | Disables the component. Blocks everything, arrow-key stepping included. For a number that is derived or detected rather than forbidden, |
disableFormatting Type: booleanDefaultfalse | Shows the number as typed (period decimal, no grouping), with Shows the number as typed, with a period decimal and no grouping, and puts |
errors Type: string | string[] | Error messages under the field, a string or array, in an Where a business rule lives, since |
formless Type: booleanDefaultfalse | Keep this control out of the enclosing |
hasErrors Type: booleanDefaultfalse | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. Forces the error chrome without a message of its own. Reach for it when the text lives in a summary alert above the form. See example |
hasWarnings Type: booleanDefaultfalse | Define if the component should be in a warning state. Same chrome as errors with The amber counterpart of |
hideLabel Type: booleanDefaultfalse | Visually hides the label of the input while maintaining accessibility. |
hint Type: string | Text box to be displayed near the input, usually to indicate instructions. The natural home for the range or the unit, because |
id Type: string | The |
inputAlign Type: FieldCrossAlign | Vertical position of the control in a side-by-side row; not |
label requiredType: string | Text content of the label of the element. Names the field for display and for assistive technology only. It does not set |
labelAlign Type: FieldCrossAlign | Vertical position of the label block in a side-by-side row; not |
labelMode Type: "outside" | "floating" | "inside" | Label rendering mode. Unset, it falls back to the project-wide |
labelPosition Type: "left" | "center" | "right" | Sets the text alignment of the label. |
layout Type: Responsive<FieldLayout> | How label and input sit together: Ignored, without a warning, unless the resolved label mode is |
loading Type: booleanDefaultfalse | Sets the component in a loading state, usually triggering some visual styles. Visual only. The field stays editable underneath the spinner, so if an async check has to settle before the value is usable, guard that yourself. See example |
max Type: numberDefaultNumber.MAX_SAFE_INTEGER | Maximum value cap. Clamps the emitted value at once, with no message and no event, so a user who types past it sees their number change under them. Say the ceiling in |
maxPrecision Type: numberDefault8 | Maximum precision of the number: fraction digits past it are refused as typed (never rounded). With
|
min Type: numberDefaultNumber.MIN_SAFE_INTEGER | Minimum value cap. Applied on blur and on Enter (before a surrounding form submits), not while typing, so a value above a Applied when the field loses focus or on Enter, not per keystroke, so |
minPrecision Type: numberDefault0 | Fraction digits always shown ( Decimals always shown, padded with zeros the user types over: with |
modelValue Type: string | number | nullDefaultnull | Used by v-model. Accepts |
name Type: string | Defines the name of the input. Not derived from |
persistentHint Type: booleanDefaultfalse | Keeps the hint displayed. |
placeholder Type: string | Text shown while the field is empty. |
prepend:icon Type: string | Name of the icon to be added at the start of the input. The uncontested position: nothing in the component competes for it. Put decorative iconography here and keep |
pt Type: (PtMap<TextControlPtPart, FormControlPtState> & { "root:outline"?: PtValue | undefined; "icon:outline"?: PtValue | undefined; "root:secondary"?: PtValue | undefined; "icon:secondary"?: PtValue | undefined; "spinner:outline"?: PtValue | undefined; "spinner:secondary"?: PtValue | undefined; "clear:outline"?: PtValue | undefined; "clear:secondary"?: PtValue | undefined; "root:ghost"?: PtValue | undefined; "icon:ghost"?: PtValue | undefined; "spinner:ghost"?: PtValue | undefined; "clear:ghost"?: PtValue | undefined; "label:outline"?: PtValue | undefined; "label:secondary"?: PtValue | undefined; "label:ghost"?: PtValue | undefined; "description:outline"?: PtValue | undefined; "description:secondary"?: PtValue | undefined; "description:ghost"?: PtValue | undefined; "message:outline"?: PtValue | undefined; "message:secondary"?: PtValue | undefined; "message:ghost"?: PtValue | undefined; "hint:outline"?: PtValue | undefined; "hint:secondary"?: PtValue | undefined; "hint:ghost"?: PtValue | undefined; "input:outline"?: PtValue | undefined; "input:secondary"?: PtValue | undefined; "input:ghost"?: PtValue | undefined; "box:outline"?: PtValue | undefined; "box:secondary"?: PtValue | undefined; "box:ghost"?: PtValue | undefined; "prefix:outline"?: PtValue | undefined; "prefix:secondary"?: PtValue | undefined; "prefix:ghost"?: PtValue | undefined; "suffix:outline"?: PtValue | undefined; "suffix:secondary"?: PtValue | undefined; "suffix:ghost"?: PtValue | undefined; }) | Passthrough, object form: |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
readonly Type: booleanDefaultfalse | Sets the input in a readonly state. The right state for a number that is computed or detected rather than entered, such as a total or a weight read off a scale. Unlike |
required Type: booleanDefaultfalse | Marks the input required (asterisk, aria-required, native validation in a plain form). Inside a BbForm it is not enforced; use rules="required" or the schema. Forwards to the native input and validates nothing on its own. It raises the required marker (unless |
reverse Type: booleanDefaultfalse | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
rules Type: RuleExpression<string | number | null> | vee-validate rules for this field. Only inside a Read only inside a |
step Type: numberDefault1 | Incremental unit used by ArrowUp / ArrowDown and by the Drives ArrowUp/ArrowDown and the |
unit Type: BbNumberUnit | A unit Typed: only units |
validationLabel Type: string | The field's name in validation messages ( |
validationMode Type: ValidationMode | When the field validates: |
variant Type: InputVariantTypeDefault'outline' | The field box's look, with |
warnings Type: string | string[] | Warning messages under the field, a string or array: amber, in their own For a number that is valid and still worth a second look. Errors win when both are set and the warnings are suppressed, so the field is never amber and red at once. See example |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: string | number | null | Seed it with |
Events
| Name | Description |
|---|---|
blur Type: (event: FocusEvent): void | Emitted when the native input loses focus. Forwards the original DOM |
change Type: (event: Event): void | Emitted when the native input fires a change event. Forwards the original DOM |
click Type: (event: MouseEvent): void | Emitted when the input receives a click interaction. Forwards the original DOM |
compositionend Type: (event: CompositionEvent): void | Emitted when a composition session ends (e.g. CJK IME confirmed). Forwards the original DOM |
compositionstart Type: (event: CompositionEvent): void | Emitted when a composition session starts (e.g. CJK IME begins). Forwards the original DOM |
decrease Type: (value: number): void | Emitted by the |
focus Type: (event: FocusEvent): void | Emitted when the native input gains focus. Forwards the original DOM |
increase Type: (value: number): void | Emitted by the Fires with the new, already clamped number, alongside |
input Type: (event: Event): void | Emitted on native input events from the number input. Forwards the original DOM
|
keydown Type: (event: KeyboardEvent): void | Emitted for keyboard interaction on the input. Forwards the original DOM |
keyup Type: (event: KeyboardEvent): void | Emitted when a key is released over the input. Forwards the original DOM |
mousedown Type: (event: MouseEvent): void | Emitted when a pointing device button is pressed over the input. Forwards the original DOM |
mouseup Type: (event: MouseEvent): void | Emitted when a pointing device button is released over the input. Forwards the original DOM |
paste Type: (event: ClipboardEvent): void | Emitted when content is pasted into the input. Forwards the original DOM Forwarded as is. The field already reads a paste as a number (the first one in the text, symbols and words dropped, brackets negative), so a handler never needs to clean the clipboard text. See example |
update:modelValue Type: (value: number | null): void | Emitted on any value change with the parsed number or Emits |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
append Type: BbNumberInputStepSlotProps | Content rendered after the number input, at the end of the inner container. Typically used to place increment/decrement buttons next to the input. Same |
append:outer Type: BbNumberInputStepSlotProps | Content rendered after the entire input control, outside the input chrome. The uncontested place for an action beside the field, since nothing inside the component competes for it. |
description Type: BbNumberInputDescriptionSlotProps | Replaces the description text. Provided alone (no |
label Type: BbNumberInputLabelSlotProps | Replaces the default label text rendered above the number input. Receives |
prefix Type: BbNumberInputStepSlotProps | Inline content rendered at the start of the input field area, before the typed number. Decoration only, inside the field. Not for a currency symbol: |
prepend Type: BbNumberInputStepSlotProps | Content rendered before the number input, at the start of the inner container. Receives |
prepend:outer Type: BbNumberInputStepSlotProps | Content rendered before the entire input control, outside the input chrome. Outside the field chrome entirely. Reach for it when a stepper button should not sit inside the border, or when the append position is already taken by a clear button or a spinner. |
suffix Type: BbNumberInputStepSlotProps | Inline content rendered at the end of the input field area, after the typed number. Inert, like |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
- slot
append-outerappend:outerfails silently directionlayoutfails silentlyhasWarninghasWarningsfails silently- slot
prepend-outerprepend:outerfails silently validateOnvalidationModefails silentlyAn array of events became one mode (
aggressive|balanced|lazy|submit-only|submit-live). The old defaults (['blur'],['inactive'], a toggle's['update:modelValue', 'change', 'blur']) arebalanced, the new default: delete the prop. A text field on['update:modelValue']isvalidation-mode="aggressive". Set it once on<BbForm validation-mode>instead of per field.vidremovedfails silentlyA display name (v2:
vid="Email address") is nowvalidation-label; a field path (3.0 betas:vid="address.city") is nowname(brackets for a native post:address[city]).check --fixpicks by the value.