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

# transition-property

APISummary
## Introduction

The transition-property CSS property sets the CSS properties to which a transition effect should be applied.

## Examples

**This is an example below: css-api**

**Entry:** `src/transition-property`
**Bundle:** `dist/transition-property.lynx.bundle`

```tsx
import { root, useState } from "@lynx-js/react";
import "./index.scss";

const Transition = () => {
  const [flag, setFlag] = useState(false);

  const baseStyle = {
    opacity: flag ? "1" : "0.1" as const,
    width: flag ? "100px" : "200px",
    height: flag ? "100px" : "200px",
    backgroundColor: flag ? "blue" : "red",
    visibility: (flag ? "visible" : "hidden") as "visible" | "hidden",
    top: flag ? "0px" : "50px",
    right: flag ? "0px" : "50px",
    bottom: flag ? "0px" : "50px",
    left: flag ? "0px" : "50px",
    transform: flag ? "translateX(0px)" : "translateX(50px)" as const,
  };

  return (
    <scroll-view scroll-orientation="vertical" className="scroll">
      <view className="base" bindtap={() => setFlag(!flag)}>
        <text>Click to transition</text>
      </view>
      <view className="base opacityTransition" style={{ opacity: baseStyle.opacity }}>
        <text>Opacity animation</text>
      </view>
      <view className="base widthTransition" style={{ width: baseStyle.width }}>
        <text>Width animation</text>
      </view>
      <view className="base heightTransition" style={{ height: baseStyle.height }}>
        <text>Height animation</text>
      </view>
      <view className="base bgColorTransition" style={{ backgroundColor: baseStyle.backgroundColor }}>
        <text>Background color animation</text>
      </view>
      <view className="base transformTransition" style={{ transform: baseStyle.transform }}>
        <text>Transform animation</text>
      </view>
    </scroll-view>
  );
};

root.render(<Transition />);

```

v0.11.0



## Syntax

```css
/* Keyword values */
transition-property: none;
transition-property: all;

/* <custom-ident> values */
transition-property: test_05;
transition-property: -specific;
transition-property: sliding-vertically;

/* Multiple values */
transition-property: test1, animation4;
transition-property: all, height, color;
```

### Values

- left
- right
- top
- bottom
- width
- height
- opacity
- background-color
- color
- transform
- transform-origin
- max-width
- min-width
- max-height
- min-height
- padding-left
- padding-right
- padding-top
- padding-bottom
- margin-left
- margin-right
- margin-top
- margin-bottom
- border-left-width
- border-right-width
- border-top-width
- border-bottom-width
- border-left-color
- border-right-color
- border-top-color
- border-bottom-color
- flex-basis
- flex-grow
- filter

## Formal definition

| Initial value | empty value |
| Applies to | all elements |
| Inherited | no |
| Animatable | no |


## Formal syntax

```
transition-property =
  none                           |
  <single-transition-property>#

<single-transition-property> =
  all             |
  <custom-ident>
```

## More

- [transition-delay](/next/api/css/properties/transition-delay.md)
- [transition-duration](/next/api/css/properties/transition-duration.md)
- [transition](/next/api/css/properties/transition.md)
- [transition-timing-function](/next/api/css/properties/transition-timing-function.md)
- [Animation Event](/next/api/lynx-api/event/animation-event.md)

## Compatibility

**Compatibility Table**

**Query:** `css.properties.transition-property`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/110-transition-property.json) · [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/transition-property)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| transition-property | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| box-shadow | Yes (4.2) | Yes (4.2) | Yes (4.2) | Yes (4.2) | Yes (4.2) | Yes |

**`transition-property`**

**Specifications:**

**`box-shadow`**

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/110-transition-property.json)

- **Android — From 4.2:** The new animator supports <code>transition-property: box-shadow</code> since Lynx 4.2.
- **HarmonyOS — From 4.2:** The new animator supports <code>transition-property: box-shadow</code> since Lynx 4.2.
- **iOS — From 4.2:** The new animator supports <code>transition-property: box-shadow</code> since Lynx 4.2.

