> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Get a prop by name (Beta)

> Returns a single prop definition by its display name

## `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()`](/designer/reference/managing-components/get-prop).
To retrieve all prop definitions on a component, use [`component.getProps()`](/designer/reference/managing-components/get-props).

> **Beta**
>
> These methods are in public beta and may change with future releases.

### Syntax

```typescript
component.getPropByName(name: string): Promise<Prop>
component.getPropByName(groupName: string, name: string): Promise<Prop>
```

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()`](/designer/reference/managing-components/create-prop):

```typescript
interface Prop {
  /** Unique prop ID. */
  id: string;
  /** The prop type. */
  type: PropType;
  /** The binding value type, derived from the prop type. */
  valueType: BindableValueType;
  /** Value types that this prop can bind to. */
  bindableTo: readonly BindableValueType[];
  /** Display name. */
  name: string;
  /** Group name, or null if ungrouped. */
  group: string | null;
  /** Tooltip text, or null if not set. */
  tooltip: string | null;
  /** Default value, or null if not set. */
  defaultValue: unknown | null;
  // Type-specific settings, included when applicable:
  multiline?: boolean;   // textContent
  min?: number;          // number
  max?: number;          // number
  decimals?: number;     // number
  trueLabel?: string;    // boolean
  falseLabel?: string;   // boolean
}
```

### Examples

Look up a prop by name across all groups:

```typescript
const component = await webflow.getCurrentComponent()

if (component) {
  const prop = await component.getPropByName('CTA Link')
  console.log(prop)
  /*
  {
    id: 'prop_4',
    type: 'link',
    valueType: 'link',
    bindableTo: ['link'],
    name: 'CTA Link',
    group: 'Content',
    tooltip: null,
    defaultValue: {
      mode: 'url',
      to: 'https://example.com/signup',
      openInNewTab: true
    }
  }
  */
}
```

Look up a prop by group and name:

```typescript
const component = await webflow.getCurrentComponent()

if (component) {
  const prop = await component.getPropByName('Settings', 'Overlay Opacity')
  console.log(prop)
  /*
  {
    id: 'prop_5',
    type: 'number',
    valueType: 'number',
    bindableTo: ['number', 'string', 'textContent', 'altText', 'id'],
    name: 'Overlay Opacity',
    group: 'Settings',
    tooltip: null,
    defaultValue: 50,
    min: 0,
    max: 100,
    decimals: 0
  }
  */
}
```

Look up an ungrouped prop by name:

```typescript
const component = await webflow.getCurrentComponent()

if (component) {
  const prop = await component.getPropByName('Color Scheme')
  console.log(prop.group) // null
}
```

[Try this example](https://webflow.com/oauth/authorize?response_type=code\&client_id=19511de1ec410f9228d8dcbc9420e67916dea80d86d18f0c9a533eb475ea0f62)

### Designer Ability

Checks for authorization only.

| Designer Ability    | Locale | Branch | Workflow | Sitemode |
| :------------------ | :----- | :----- | :------- | :------- |
| **canAccessCanvas** | Any    | Any    | Any      | Any      |