> 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-timing-function

APISummary
## Introduction

The transition-timing-function CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect.

## Examples

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

**Entry:** `src/transition-timing-function`
**Bundle:** `dist/transition-timing-function.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 allTransition"
        style={{
          opacity: baseStyle.opacity,
          width: baseStyle.width,
          height: baseStyle.height,
          backgroundColor: baseStyle.backgroundColor,
          transitionTimingFunction: "linear",
        }}
      >
        <text>linear transition</text>
      </view>
      <view
        className="base allTransition"
        style={{
          opacity: baseStyle.opacity,
          width: baseStyle.width,
          height: baseStyle.height,
          backgroundColor: baseStyle.backgroundColor,
          transitionTimingFunction: "ease",
        }}
      >
        <text>ease transition</text>
      </view>
      <view
        className="base allTransition"
        style={{
          opacity: baseStyle.opacity,
          width: baseStyle.width,
          height: baseStyle.height,
          backgroundColor: baseStyle.backgroundColor,
          transitionTimingFunction: "ease-in",
        }}
      >
        <text>ease-in transition</text>
      </view>
      <view
        className="base allTransition"
        style={{
          opacity: baseStyle.opacity,
          width: baseStyle.width,
          height: baseStyle.height,
          backgroundColor: baseStyle.backgroundColor,
          transitionTimingFunction: "ease-out",
        }}
      >
        <text>ease-out transition</text>
      </view>
      <view
        className="base allTransition"
        style={{
          opacity: baseStyle.opacity,
          width: baseStyle.width,
          height: baseStyle.height,
          backgroundColor: baseStyle.backgroundColor,
          transitionTimingFunction: "ease-in-out",
        }}
      >
        <text>ease-in-out transition</text>
      </view>
    </scroll-view>
  );
};

root.render(<Transition />);

```

v0.11.0



## Syntax

```css
transition-timing-function: ease;
transition-timing-function: ease-in;
transition-timing-function: ease-out;
transition-timing-function: ease-in-out;
transition-timing-function: linear;
transition-timing-function: step-start;
transition-timing-function: step-end;

transition-timing-function: cubic-bezier(0.1, 0.7, 1, 0.1);
```

### Values

- `linear`

- `ease`

- `ease-in`

- `ease-out`

- `ease-in-out`

- `square-bezier()`

- `cubic-bezier()`

Default : **linear**

## Formal definition

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


## Formal syntax

```
transition-timing-function:linear|ease|ease-in|ease-out|ease-in-out|square-bezier()|cubic-bezier();
```

## 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-timing-function`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| transition-timing-function | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| linear | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| ease-in | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| ease-out | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| ease-in-ease-out | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | No |
| ease | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| ease-in-out | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| square-bezier | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | No |
| cubic-bezier | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| step-start | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| step-end | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |
| steps | Yes (1.0) | Unknown | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`transition-timing-function`**

**Specifications:**

**`linear`**

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

**`ease-in`**

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

**`ease-out`**

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

**`ease-in-ease-out`**

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

- **Web — Not supported:** Uses browser CSS easing functions; Lynx-specific easing names are not translated.

**`ease`**

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

**`ease-in-out`**

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

**`square-bezier`**

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

- **Android — From 1.0:** The new animator supports <code>square-bezier()</code> since Lynx 4.0; the non-new animator has supported it since the original version.
- **iOS — From 1.0:** The new animator supports <code>square-bezier()</code> since Lynx 4.0; the non-new animator has supported it since the original version.
- **macOS — From 1.0:** The new animator supports <code>square-bezier()</code> since Lynx 4.0; the non-new animator has supported it since the original version.
- **Windows — From 1.0:** The new animator supports <code>square-bezier()</code> since Lynx 4.0; the non-new animator has supported it since the original version.
- **Web — Not supported:** Uses browser CSS easing functions; Lynx-specific easing names are not translated.

**`cubic-bezier`**

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

**`step-start`**

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

**`step-end`**

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

**`steps`**

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

- **Android — From 1.0:** Lynx requires the second <code>&lt;step-position&gt;</code> argument; unlike Web, <code>steps(n)</code> is invalid. Use <code>steps(n, end)</code> or <code>steps(n, jump-end)</code>.
- **iOS — From 1.0:** Lynx requires the second <code>&lt;step-position&gt;</code> argument; unlike Web, <code>steps(n)</code> is invalid. Use <code>steps(n, end)</code> or <code>steps(n, jump-end)</code>.
- **macOS — From 1.0:** Lynx requires the second <code>&lt;step-position&gt;</code> argument; unlike Web, <code>steps(n)</code> is invalid. Use <code>steps(n, end)</code> or <code>steps(n, jump-end)</code>.
- **Windows — From 1.0:** Lynx requires the second <code>&lt;step-position&gt;</code> argument; unlike Web, <code>steps(n)</code> is invalid. Use <code>steps(n, end)</code> or <code>steps(n, jump-end)</code>.

