Get a prop by name (Beta)
Get a prop by name (Beta)
component.getPropByName(name)
Returns a single prop definition by its display name, or by its group and display name.
Use this method when you know a prop’s human-readable name but not its ID.
To look up a prop by its ID, use component.getProp().
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
When called with one argument, the method searches all groups, including ungrouped props. When called with two arguments, the method matches props in the specified group only.
Parameters
name: string — The display name of the prop to retrieve.groupName: string — (optional) The name of the group the prop belongs to. When provided, the method searches only within that group.
Returns
Promise<Prop>
A Promise that resolves to the matching Prop object.
The Prop interface uses the same shape as the return value of component.createProp():
Examples
Look up a prop by name across all groups:
Look up a prop by group and name:
Look up an ungrouped prop by name:
Designer Ability
Checks for authorization only.