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

APISummary
## Introduction

The `text-shadow` CSS property adds shadows to text.

## Examples

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

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

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

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

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

  const noneStyle = {
    textShadow: "none" as const,
  };

  const singleStyle = {
    textShadow: "1px 1px 2px #558abb" as const,
  };

  const multiStyle = {
    textShadow: "1px 1px 2px red, 0 0 1em blue, 0 0 0.2em blue" as const,
  };

  const rgbaStyle = {
    textShadow: "0 .005px .01rem rgba(70, 70, 70, .3)" as const,
  };

  return (
    <scroll-view className="root" scroll-orientation="vertical">
      <view className="fixed_area">
        <view style={containerStyle}>
          <text style={headerStyle}>text-shadow</text>
          <text style={noneStyle}>text-shadow: none;</text>
          <text style={singleStyle}>text-shadow: 1px 1px 2px #558abb;</text>
          <text style={multiStyle}>text-shadow: 1px 1px 2px red, 0 0 1em blue, 0 0 0.2em blue;</text>
          <text style={rgbaStyle}>text-shadow: 0 .005px .01rem rgba(70, 70, 70, .3);</text>
        </view>
      </view>
    </scroll-view>
  );
};

root.render(<TextShadow />);

```

v0.11.0



## Syntax

```css
/* offset-x | offset-y | blur-radius | color */
text-shadow: 1px 1px 2px black;

/* color | offset-x | offset-y | blur-radius */
text-shadow: #fc0 1px 0 10px;

/* offset-x | offset-y | color */
text-shadow: 5px 5px #558abb;

/* color | offset-x | offset-y */
text-shadow: white 2px 5px;

/* offset-x | offset-y
/* Use defaults for color and blur-radius */
text-shadow: 5px 10px;
```

## Formal definition

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


## Formal Syntax

```
none | [ <length>{3} <color> ]
```

## Differences from the Web

- Only support one shadow layer.

- For now both `offset-x`,`offset-y`,`blur-radius` and `color` are mandatory. And `color` must be the last value.

## Notes

- In some old version Android platform, `text-shadow` may not be rendered when `blur-radius` is 0.

## Compatibility

**Compatibility Table**

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

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

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

**`text-shadow`**

**Specifications:**

