Boolean
Add a Boolean property to your component to change behavior, interactivity, or styles.
Use a Boolean prop when you want designers to:
- Enable or disable a feature
- Toggle styling variations
- Create behavior variations
Syntax
Prop definition
Define the Boolean prop in your Webflow code component with a name.
Optionally, you can add a default value and labels for the true and false values. Additionally, you can add a group and tooltip text.
Properties
name
: The name for the property.group
: The group for this property (optional).tooltip
: The tooltip for this property (optional).defaultValue
: Default value for all component instances. (optional)trueLabel
: Label for thetrue
value in the props panel. (optional)falseLabel
: Label for thefalse
value in the props panel. (optional)
Example
MyComponent.webflow.tsx
Prop value
The Boolean prop provides a boolean
value to your React component:
PropType.Boolean
Properties
n/a
Webflow properties panel

Example
MyComponent.tsx