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

# justify-self

APISummary
## Introduction

The CSS `justify-self` property sets the way a box is justified inside its alignment container along the appropriate axis. It aligns the items inside their grid areas on the inline axis.

## Examples

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

**Entry:** `src/justify-self`
**Bundle:** `dist/justify-self.lynx.bundle`

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

const JustifySelf = () => {
  const containerStyle = {
    display: "grid" as const,
    gridTemplateColumns: "auto",
  };

  const getJustifySelfStyle = (justify: string) => ({
    justifySelf: justify,
  });

  return (
    <view style={containerStyle}>
      <text className="item" style={getJustifySelfStyle("stretch")}>justify-self:stretch</text>
      <text className="item" style={getJustifySelfStyle("center")}>justify-self:center</text>
      <text className="item" style={getJustifySelfStyle("start")}>justify-self:start</text>
      <text className="item" style={getJustifySelfStyle("end")}>justify-self:end</text>
    </view>
  );
};

root.render(<JustifySelf />);

```

v0.11.0



## Syntax

```css
justify-self: auto;
justify-self: stretch;
justify-self: center;
justify-self: start;
justify-self: end;
```

### Values

#### `auto`

**Default value**. The value used is the value of the [`justify-items`](/next/api/css/properties/justify-items.md) property of the parents box.

#### `stretch`

If the combined size of the items is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by [`max-height`](/next/api/css/properties/max-height.md)/[`max-width`](/next/api/css/properties/max-width.md) (or equivalent functionality), so that the combined size exactly fills the alignment container.

#### `center`

The items are packed flush to each other toward the center of the alignment container.

#### `start`

The item is packed flush to each other toward the start edge of the alignment container in the appropriate axis.

#### `end`

The item is packed flush to each other toward the end edge of the alignment container in the appropriate axis.

## Formal definition

| Initial value | auto |
| Applies to | grid items |
| Inherited | no |
| Animatable |  |


## Formal syntax

justify-self =
auto |
stretch |
center |
start |
end

## Differences from the Web

[mdn: justify-self](https://developer.mozilla.org/en/docs/Web/CSS/justify-self)

1. `normal` is not supported. Initial value is `stretch`.
2. `self-start`, `self-end`, `left`, `right`, `flex-start`, `flex-end` are not supported.

## Compatibility

**Compatibility Table**

**Query:** `css.properties.justify-self`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| justify-self | Yes (2.1) | Yes (3.4) | Yes (2.1) | Yes (2.1) | Yes (2.1) | Yes |

**`justify-self`**

The CSS justify-self property sets the way a box is justified inside its alignment container along the appropriate axis.

**Specifications:**

