Skip to content

NumberInput

uitemplate

NumberInput component

Installation

$ bunx termuijs add number-input

Copies the source into src/components/number-input/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { NumberInput } from '@termuijs/ui'
ts
new NumberInput(style: Partial<Style> = {}, options: NumberInputOptions = {},)

API Reference

NumberInput

PropTypeRequiredDescription
placeholderstringoptional
stepnumberoptional
minnumberoptional
maxnumberoptional
allowDecimalbooleanoptional
onChange(value: number | null) => voidoptional
onSubmit(value: number | null) => voidoptional
#template#number-input