> 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-decoration

APISummary
## Introduction

The `text-decoration` shorthand CSS property sets the appearance of decorative lines on text.

## Examples

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

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

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

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

  const headerStyle = {
    backgroundColor: "#ccc",
    marginTop: "10px",
  };

  const noneStyle = {
    textDecoration: "none",
  };

  const underlineStyle = {
    textDecoration: "underline",
  };

  const lineThroughStyle = {
    textDecoration: "line-through",
  };

  const redSolidStyle = {
    textDecoration: "underline line-through red solid",
  };

  const greenDottedStyle = {
    textDecoration: "underline line-through green dotted",
  };

  const blueDashedStyle = {
    textDecoration: "underline line-through blue dashed",
  };

  return (
    <scroll-view className="root" scroll-orientation="vertical">
      <view className="fixed_area">
        <view style={containerStyle}>
          <text style={headerStyle}>text-decoration</text>
          <text style={noneStyle}>None</text>
          <text style={underlineStyle}>Underline</text>
          <text style={lineThroughStyle}>Line Through</text>
          <text style={redSolidStyle}>Red Solid Line</text>
          <text style={greenDottedStyle}>Green Dotted Line</text>
          <text style={blueDashedStyle}>Blue Dashed Line</text>
        </view>
      </view>
    </scroll-view>
  );
};

root.render(<TextDecoration />);

```

v0.11.0



## Syntax

```css
text-decoration: underline;
text-decoration: line-through red;
text-decoration: none;
```

### Values

#### **text-decoration-line**

The `text-decoration-line` CSS property sets the kind of decoration that is used on text in an element.

- `none` 

  **Default value**. Produces no text decoration.

- `underline`
  Each line of text has a decorative line beneath it.

- `line-through`
  Each line of text has a decorative line going through its middle.

#### **text-decoration-color**

The `text-decoration-color` CSS property sets the color of decorations.

- [`<color>`](/next/api/css/data-type/color.md)

#### **text-decoration-style**

The `text-decoration-style` CSS property sets the style of the lines specified by `text-decoration-line`.

- `solid`
  Draws a single line.

- `double`
  Draws a double line.

- `dotted`
  Draws a dotted line.

- `dashed`
  Draws a dashed line.

- `wavy`
  Draws a wavy line.

## Formal definition

| Initial value | empty value |
| Applies to | text |
| Inherited | yes |
| Animatable | no |


## Differences from the Web

- Not support [`text-decoration-thickness`](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-decoration-thickness)
- Not support multiple decoration lines.

## Compatibility

**Compatibility Table**

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

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

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

**`text-decoration`**

**Specifications:**

