Number
Add a Number property to your component so designers can input numeric values.
Syntax
Prop definition
Define the Number prop in your Webflow code component with a name. Optionally, you can add a group, tooltip text, and a default value, as well as numeric constraints like min, max, and decimals.
Properties
name
: The name for the property.group
: The group for this property. (optional)tooltip
: The tooltip for the property. (optional)defaultValue
: Default value for all component instances. (optional)min
: Minimum value allowed. (optional)max
: Maximum value allowed. (optional)decimals
: Maximum number of decimal places. (optional)
Example
MyComponent.webflow.tsx
Prop value
The Number prop provides a numeric value to your React component.
PropType.Number
Properties
n/a
Webflow properties panel

Example
MyComponent.tsx
When to use
Use a Number prop when you want designers to:
- Set numeric values like counts, sizes, or durations
- Control values within specific ranges
- Provide sensible defaults for components
- Limit decimal precision for cleaner data
Best practices
- Set appropriate min/max values for your use case
- Use decimals: 0 for whole numbers, 1-2 for currency/percentages
- Provide meaningful default values
- Consider the range designers will need