Skip to content

GhostNumberInput reference ​

Package: @ghostvue/themes. Status: experimental (stability policy).

Themed wrapper around headless GhostNumberInput. Forwards behavioral props and adds size and block layout hooks. class and style go to a frame around the whole control; other attributes reach the text input.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
modelValuenumber | null—NoControlled value forwarded to the unstyled spinbutton.
defaultValuenumber | nullnullNoInitial uncontrolled value forwarded to the unstyled spinbutton.
minnumber—NoInclusive minimum forwarded to the unstyled spinbutton.
maxnumber—NoInclusive maximum forwarded to the unstyled spinbutton.
stepnumber1NoStep amount forwarded to the unstyled spinbutton.
localestring—NoIntl locale forwarded to the unstyled spinbutton.
formatOptionsIntl.NumberFormatOptions—NoIntl format options forwarded to the unstyled spinbutton.
disabledbooleanfalseNoForwards disabled semantics.
readonlybooleanfalseNoForwards readonly semantics.
invalidbooleanfalseNoForwards invalid semantics.
requiredbooleanfalseNoForwards required semantics.
decrementLabelstring"Decrease"NoAccessible decrement label.
incrementLabelstring"Increase"NoAccessible increment label.
size'sm' | 'md' | 'lg'"md"NoControl size. Default omits data-size.
blockbooleanfalseNoFill the container's inline size via data-block. Without it the control fits about eight digits and fills a GhostField.

Emits ​

None declared.

Models ​

PropEventTypeDescription
modelValueupdate:modelValuenumber | nullv-model binding forwarded to the unstyled spinbutton.

Slots ​

None declared.

Exposed members ​

NameTypeDescription
elementHTMLInputElement | nullThe spinbutton input after mount.
focus(options?: FocusOptions) => voidFocus the spinbutton.
blur() => voidBlur the spinbutton.
increment() => voidStep up when not disabled or readonly.
decrement() => voidStep down when not disabled or readonly.

Parts and data attributes ​

AttributeValueDescription
data-partrootFlex row grouping buttons and input.
data-partinputThemed spinbutton field.
data-partdecrementStep-down button.
data-partincrementStep-up button.
data-stateinvalidForwarded invalid styling on the root.

CSS variables ​

None declared.

Accessibility ​

Role: spinbutton. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/.

Required ARIA attributes: none.

Keyboard ​

KeyActionAutomated browser test
ArrowUpIncrease by step.Not reviewed
ArrowDownDecrease by step.Not reviewed

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

number-input/order-limits ​

Example source

Plan & quota limits

Bounded, currency-formatted, and disabled GhostNumberInput controls with live total.

Plan & quota limits

Adjust team seats and monthly spend caps. Estimated seat cost: $288 / month.

number-input/workshop-booking ​

Example source

Workshop booking

Seat and session-length limits with unit-formatted values, disabled steppers at the bound, and a limit message.

Book a design workshop

$30 per seat per hour. Seats and length stop at their limits.

number-input/themed ​

Example source

Themed

Large block retry delay in seconds from @ghostvue/themes.