# overflow-inline

> Applies `overflow-inline`, independently of the block axis.

```ts
import { overflowInline } from "@sdxc/u/overflow";
```

Applies `overflow-inline`, independently of the block axis. The inline axis
follows writing mode and direction, so the utility stays correct under RTL
and vertical writing modes.

## Quick reference

Every documented call, beside the CSS it emits.

| Call | CSS |
| --- | --- |
| `u.overflowInline("auto")` | `css({ overflowInline: "auto" })` |

## Examples

### Basic example

Use `overflowInline("auto")` to let an element scroll along the inline axis, horizontally in a left-to-right page, when its content does not fit. Scroll the row sideways:

```tsx
<div
	mix={[overflowInline("auto"), hstack({ gap: 4 }), is(96), maxIs("100%"), p(4), ...]}
>
	<div mix={[shrink(), is(24), ...]}>1</div>
	<div mix={[shrink(), is(24), ...]}>2</div>
	<div mix={[shrink(), is(24), ...]}>3</div>
	<div mix={[shrink(), is(24), ...]}>4</div>
	<div mix={[shrink(), is(24), ...]}>5</div>
</div>
```

### Clipping the inline axis

Call `overflowInline()`, which applies `hidden`, to clip content that overflows along the inline axis:

```tsx
<div mix={[overflowInline(), hstack({ gap: 4 }), is(96), maxIs("100%"), p(4), ...]}>
	<div mix={[shrink(), is(24), ...]}>1</div>
	<div mix={[shrink(), is(24), ...]}>2</div>
	<div mix={[shrink(), is(24), ...]}>3</div>
	<div mix={[shrink(), is(24), ...]}>4</div>
	<div mix={[shrink(), is(24), ...]}>5</div>
</div>
```

## Applying on a state

Wrap the call in a state utility to scope it to one selector.

```ts
u.hover(u.overflowInline("auto"))
```

## Responsive design

Wrap the call in a container query to scope it to one width.

```ts
u.at("md", u.overflowInline("auto"))
```

## Signature

```ts
u.overflowInline(value?: OverflowValue)
```
