Draft UI

Number Field

A number field allows a user to enter a number, and increment or decrement the value using stepper buttons.

Installation

bash
npx @sly-cli/sly add draft-ui number-field

Examples

Default

This is the default NumberField

With Stepper

This is an example using the built-in NumberInputStepper.

With Mobile Stepper

This is an example of a custom NumberField that makes the stepper buttons easier to press on touch devices.

Disabled

Use the isDisabled prop to make the NumberField disabled.