webflow svelte components logoWFS

Number input

Form field for numerical values.

Usage

<script lang="ts">
  import { NumberInput } from '$lib/components/input';
</script>
<NumberInput placeholder="Number of members" />

Properties

PropTypeDefault
icon
ComponentType
-
value
number
-
placeholder
string
-
min
number
-
max
number
-
disabled
boolean
false
error
boolean
false

Examples

Icon support

Use the icon property to add an icon to the NumberInput component.

Min max

Use the min and max properties to set the minimum and maximum input values.

Error

Use the error property to indicate that the input has an error.

Disabled

Use the disabled property to prevent users from interacting with the input.

On this page