> 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 (Beta)

> Returns a single prop definition by its ID

## `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()`](/designer/reference/managing-components/create-prop) response) and need to look up its current definition without fetching all props.
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.getProp(propId: string): Promise<Prop>
```

### 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()`](/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

Get a prop by its ID:

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

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

Create a prop and then look it up by its ID:

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

if (component) {
  const created = await component.createProp({
    type: 'number',
    name: 'Max Items',
    min: 1,
    max: 100,
    defaultValue: 10,
  })

  // Later, fetch the current definition by ID
  const prop = await component.getProp(created.id)
  console.log(prop.name) // 'Max Items'
}
```

[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      |