logo-icon
STW UI

InputNumber

InputNumber is an input field for numbers.

Usage

svelte
import { InputNumber } from 'stwui';
// OR
import InputNumber from 'stwui/input-number'; // for tree shaking

Basic

With Label

With Leading

With Trailing

With Error

You're doing it wrong!

Disabled

With showSpin

With min (1)

With max (10)

With min (0) & max (10)

InputNumber Props

name string nanoid()
error string | undefined
placholder string | undefined
value string | undefined
autocomplete 'on' | 'off' | undefined
autocapitalize 'off' | 'none' | 'sentences' | 'words' | 'characters' off
readonly boolean
disabled boolean false
step number 1
showSpin boolean false

InputNumber Slots

label <InputNumber.Label slot="label" />
leading <InputNumber.Leading slot="leading" />
trailing <InputNumber.Trailing slot="trailing" />

InputNumber.Label Slots

default

InputNumber.Leading Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

InputNumber.Trailing Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

InputNumber Class Identifiers

stwui-input-number-wrapper
stwui-input-number-label
stwui-input-number-input
stwui-input-number-leading-wrapper
stwui-input-number-clear-wrapper
stwui-input-number-spin-wrapper
stwui-input-number-trailing-wrapper
stwui-input-number-error-icon
stwui-input-number-error