Get a prop (Beta)
Get a prop (Beta)
component.getProp(propId)
Returns a single prop definition by its ID.
This method returns a prop definition: the schema for the prop including its type, name, group, and default value.
Use this method when you already have a prop ID (for example, from a component.createProp() response) and need to look up its current definition without fetching all props.
To retrieve all prop definitions on a component, use component.getProps().
Beta
These methods are in public beta and may change with future releases.
Syntax
Parameters
propId: string — The unique ID of the prop to retrieve.
Returns
Promise<Prop>
A Promise that resolves to the Prop object for the given ID.
The Prop interface uses the same shape as the return value of component.createProp():
Examples
Get a prop by its ID:
Create a prop and then look it up by its ID:
Designer Ability
Checks for authorization only.