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

# border-style

APISummary
## Introduction

Used to set the styles of all four borders. This property can define the styles for the top, right, bottom, and left borders in order.

## Usage Examples

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

**Entry:** `src/border-style`
**Bundle:** `dist/border-style.lynx.bundle`

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

const BorderStyle = () => {
  const scrollViewStyle = {
    height: "100%",
  };

  const fixedAreaStyle = {
    width: "100%",
    height: "100%",
    flexDirection: "column" as const,
  };

  const styles = [
    ["solid", "dashed", "dotted"],
    ["double", "groove", "ridge"],
    ["inset", "outset", "hidden"],
    ["dotted groove", "dotted solid double", "groove solid double dashed"],
    ["outset inset", "solid none dashed", "dotted solid dashed inset"],
  ];

  return (
    <scroll-view className="root" scroll-orientation="vertical" style={scrollViewStyle}>
      <view className="fixed_area" style={fixedAreaStyle}>
        {styles.map((row, rowIndex) => (
          <view key={`normal1-${rowIndex}`}>
            <view className="row">
              {row.map((style, colIndex) => (
                <view
                  key={`normal1-${rowIndex}-${colIndex}`}
                  className="box colorWidthSame"
                  style={{ borderStyle: style }}
                >
                  <text className="text">{style}</text>
                </view>
              ))}
            </view>
          </view>
        ))}

        {styles.map((row, rowIndex) => (
          <view key={`normal2-${rowIndex}`}>
            <view className="row">
              {row.map((style, colIndex) => (
                <view
                  key={`normal2-${rowIndex}-${colIndex}`}
                  className="box colorWidthSame"
                  style={{ borderStyle: style }}
                >
                  <text className="text">{style}</text>
                </view>
              ))}
            </view>
          </view>
        ))}

        {styles.map((row, rowIndex) => (
          <view key={`radius-same-${rowIndex}`}>
            <view className="row">
              {row.map((style, colIndex) => (
                <view
                  key={`radius-same-${rowIndex}-${colIndex}`}
                  className="box colorWidthDiff2 radiusSame"
                  style={{ borderStyle: style }}
                >
                  <text className="text">{style}</text>
                </view>
              ))}
            </view>
          </view>
        ))}

        {styles.map((row, rowIndex) => (
          <view key={`radius-diff-${rowIndex}`}>
            <view className="row">
              {row.map((style, colIndex) => (
                <view
                  key={`radius-diff-${rowIndex}-${colIndex}`}
                  className="box colorWidthDiff radiusDiff"
                  style={{ borderStyle: style }}
                >
                  <text className="text">{style}</text>
                </view>
              ))}
            </view>
          </view>
        ))}
      </view>
    </scroll-view>
  );
};

root.render(<BorderStyle />);

```

v0.11.0



## Syntax

```css
border-style: double solid dotted dashed;
```

### Values

- none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
- Supports 1-4 value syntax (top → right → bottom → left).

## Formal Definition

| Initial value | solid |
| Applies to | All elements |
| Inherited | no |
| Animatable | no |


## Formal Syntax

```css
border-style = [ <line-style> ]{1,4}
<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
```

## Differences from the Web

- [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style)
- Default value is different (Web default is `none`).
- When the value is `none` or `hidden`, the border width remains unchanged (Web sets it to `0`).
- Does not support `inherit`, `initial`, `revert`, or `unset` global values.

## Compatibility

**Compatibility Table**

**Query:** `css.properties.border-style`

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

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

**`border-style`**

**Specifications:**

