ID
Add an ID property to your component so designers can set unique identifiers on HTML elements.
The ID prop creates a text input for element IDs, making it easy to target elements with CSS or JavaScript.
Syntax
Prop definition
Define the ID prop in your Webflow code component with a name. Optionally, 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).
Example
MyComponent.webflow.tsx
Prop value
The ID prop provides a string to your React component:
PropType.Id
Properties
n/a
Webflow properties panel

Example
MyComponent.tsx
When to use
Use an ID prop when you want designers to:
- Set unique identifiers for CSS targeting
- Connect form labels to inputs
- Enable JavaScript interactions