> 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-top-right-radius

APISummary
## Introduction

The border-top-right-radius CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner.

## Examples

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

**Entry:** `src/border-top-right-radius`
**Bundle:** `dist/border-top-right-radius.lynx.bundle`

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

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

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

  const styles = [
    ["2em", "2em 5em"],
    ["100px 500px", "50px 15px"],
    ["200px", "200em 100em"],
  ];

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

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

        {styles.map((row, rowIndex) => (
          <view key={`mixed-${rowIndex}`}>
            <view className="row">
              {row.map((radius, colIndex) => (
                <view
                  key={`mixed1-${rowIndex}-${colIndex}`}
                  className={`box size1 styleDiff${colIndex} colorWidthDiff${colIndex}`}
                  style={{ borderTopRightRadius: radius }}
                >
                  <text className="text">{radius}</text>
                </view>
              ))}
              {row.map((radius, colIndex) => (
                <view
                  key={`mixed2-${rowIndex}-${colIndex}`}
                  className={`box size2 colorWidthSame styleDiff2`}
                  style={{ borderTopRightRadius: radius }}
                >
                  <text className="text">{radius}</text>
                </view>
              ))}
            </view>
          </view>
        ))}
      </view>
    </scroll-view>
  );
};

root.render(<BorderTopRightRadius />);

```

v0.11.0



## Syntax

```css
/* the corner is a circle */
/* border-top-right-radius: radius */
border-top-right-radius: 3px;

/* Percentage values */

/* circle if box is a square or ellipse if box is a rectangle */
border-top-right-radius: 20%;

/* same as above: 20% of horizontal(width) and vertical(height) */
border-top-right-radius: 20% 20%;

/* 20% of horizontal(width) and 10% of vertical(height) */
border-top-right-radius: 20% 10%;

/* the corner is an ellipse */
/* border-top-right-radius: horizontal vertical */
border-top-right-radius: 0.5em 1em;
```

With one value:

- the value is a [`<length>`](/next/api/css/data-type/length.md) or a [`<percentage>`](/next/api/css/data-type/percentage.md) denoting the radius of the circle to use for the border in that corner.

With two values:

- the first value is a [`<length>`](/next/api/css/data-type/length.md) or a [`<percentage>`](/next/api/css/data-type/percentage.md) denoting the horizontal semi-major axis of the ellipse to use for the border in that corner.
- the second value is a [`<length>`](/next/api/css/data-type/length.md) or a [`<percentage>`](/next/api/css/data-type/percentage.md) denoting the vertical semi-major axis of the ellipse to use for the border in that corner.

### Values

`<length-percentage>`

Denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipse. As absolute length it can be expressed in any unit allowed
by the CSS [`<length>`](/next/api/css/data-type/length.md) data type. Percentages for the horizontal axis refer to the width of the box, percentages for the vertical
axis refer to the height of the box. Negative values are invalid.

## Formal definition

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


## Formal syntax

```
border-top-right-radius =
  <length-percentage [0,∞]>{1,2}

<length-percentage> =
  <length>      |
  <percentage>
```

## Differences from the Web

- [mdn:border-top-right-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius)

Global values are not supported, (inherit, initial, revert, unset, etc).

## Compatibility

**Compatibility Table**

**Query:** `css.properties.border-top-right-radius`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| border-top-right-radius | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`border-top-right-radius`**

**Specifications:**

