> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# getComputedStyleProperty()

APISummary
## Introduction

The **`getComputedStyleProperty()`** method of the [`Element`](/next/api/lynx-api/main-thread/main-thread-element.md) returns the [computed style](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascade/Property_value_processing#resolved_value) for the element.

## Syntax

```ts
const value = element.getComputedStyleProperty(styleName);
```

### Parameters

#### styleName

A string specifying the property name to be retrieved. The style name must be in [kebab-case](https://developer.mozilla.org/en-US/docs/Glossary/Kebab_case).

### Return Value

A string containing the value of the [computed style](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascade/Property_value_processing#resolved_value).

## Example

```ts
const width = element.getComputedStyleProperty('width');
const backgroundColor = element.getComputedStyleProperty('background-color');
```

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.main-thread.ElementGetComputedStyle`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/main-thread/ElementGetComputedStyle.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| ElementGetComputedStyle | Yes (3.5) | Yes (3.5) | Yes (3.5) | Yes (3.7) | Yes (3.7) | Yes |

**`ElementGetComputedStyle`**

Create An Animation in MTS

**Specifications:**

- **Web — Supported (version unknown):** Implemented since `@lynx-js/web-core@0.23.1` (lynx-family/lynx-stack#3262).

