> 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 style's type

> Get a style's type as it appears in the Designer's Styles panel.

## `style.getType()`

Retrieve a style's type, as it appears in the Designer's Styles panel. This method is synchronous, so it doesn't require `await`.

> **Note**
>
> You can also read a style's type from the [`style.type`](/designer/reference/styles-overview#style-properties) property, which returns the same value.

#

### Syntax

```typescript
style.getType(): StyleType
```

### Returns

**`StyleType`**

A string describing the style's type. Returns one of the following values:

| Value          | Description                                                             |
| :------------- | :---------------------------------------------------------------------- |
| `'global'`     | A named, reusable class style with no combinator.                       |
| `'combo'`      | A class modifier applied on a base class, such as `.button.is-primary`. |
| `'tag'`        | A style that targets an HTML tag, such as `h1` or `body`.               |
| `'element'`    | A style scoped to a single element instance.                            |
| `'descendant'` | A class style nested under another class, such as `.parent .child`.     |

> **Note**
>
> `'element'` styles can appear in [`webflow.getAllStyles()`](/designer/reference/get-all-styles) results, but most style operations on them aren't supported and reject with a `resourceMissing` error.

#

### Example

```typescript
// Get all styles and filter to global classes
const styles = await webflow.getAllStyles();
const globalClasses = styles.filter((style) => style.getType() === "global");
```

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

### Designer ability

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