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

# text-overflow

APISummary
## Introduction

The `text-overflow` CSS property sets how hidden overflow content is signaled to users.

## Examples

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

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

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

const TextOverflow = () => {
  const containerStyle = {
    width: "100%",
    height: "100%",
    flexDirection: "column" as const,
  };

  const sampleText = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

  return (
    <view style={containerStyle}>
      <text className="title">text-overflow: clip</text>
      <text className="item clip" text-maxline="2">
        {sampleText}
      </text>

      <text className="title">text-overflow: ellipsis</text>
      <text className="item overflow" text-maxline="2">
        {sampleText}
      </text>
    </view>
  );
};

root.render(<TextOverflow />);

```

v0.11.0



## Syntax

```css
text-overflow: clip;
text-overflow: ellipsis;
```

### Values

- `clip` 

  **Default Value**。This keyword value will truncate the text at the limit of the content area.

- `ellipsis` 

  This keyword value will display an ellipsis (`…`, `U+2026 HORIZONTAL ELLIPSIS`) to represent clipped text.

## Formal definition

| Initial value | clip |
| Applies to | text |
| Inherited | no |
| Animatable | no |


## Formal syntax

```
clip | ellipsis
```

## Differences from the Web

- Not support `fade` 。

- Not support `<string>` with custom clip text.

## Compatibility

**Compatibility Table**

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

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

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

**`text-overflow`**

**Specifications:**

