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

# overflow

APISummary
## Introduction

The overflow property specifies whether to clip the content when the content of an element is too big.

:::caution

- It's recommended to set `overflow: hidden` explicitly, if the node is not need to be overflow; On Android platform, the re-drawn region may become larger than view‘s rect when `overflow: visible`.

:::

## Examples

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

**Entry:** `src/overflow`
**Bundle:** `dist/overflow.lynx.bundle`

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

const Overflow = () => {
  const containerStyle = {
    height: "500px",
    flexDirection: "column" as const,
    justifyContent: "space-around" as const,
  };

  const firstBoxStyle = {
    overflowX: "visible",
    overflowY: "hidden",
  };

  const secondBoxStyle = {
    overflow: "hidden",
  };

  const thirdBoxStyle = {
    overflowX: "hidden",
    overflowY: "visible",
  };

  const fourthBoxStyle = {
    overflow: "hidden",
  };

  const fifthBoxStyle = {
    overflow: "visible",
  };

  return (
    <view style={containerStyle}>
      <view className="outer-box" style={firstBoxStyle}>
        <view className="inner-box"></view>
      </view>

      <view className="outer-box" style={secondBoxStyle}>
        <view className="inner-box"></view>
      </view>

      <view className="outer-box" style={thirdBoxStyle}>
        <view className="inner-box"></view>
      </view>

      <view className="outer-box" style={fourthBoxStyle}>
        <view className="inner-box"></view>
      </view>

      <view className="outer-box" style={fifthBoxStyle}>
        <view className="inner-box"></view>
      </view>
    </view>
  );
};

root.render(<Overflow />);

```

v0.11.0



## Syntax

```css
overflow: visible;
overflow: hidden;
```

### Values

- `visible`(default) the content will not be clipped, the content and the descendants may render outside the element box

- `hidden` the overflow of the content and the descendants will be clipped, the reset of the content will be visible

## Formal definition

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


## Formal syntax

```
hidden | visible
```

## Differences from the Web

- `overflow` does not contain `scroll` and `auto`, for `scroll` please use [`<scroll-view>`](/next/api/elements/built-in/scroll-view.md) directly.

## Notes

- On Android platform, the Android view that has `opacity < 1` will be rendered in an offscreen buffer by default, the offscreen makes the `overflow: visible` not work correctly, you can add `overlap={false}` to disable the offscreen rendering. The property is linked to Android View `hasOverlappingRendering` property.

## Compatibility

**Compatibility Table**

**Query:** `css.properties.overflow`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| overflow | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`overflow`**

**Specifications:**

