SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

display

Sets display: inline-flex.

tsx
import { inlineFlex } from "@sdxc/u/layout";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.inlineFlex()css({ display: "inline-flex" })

Examples

Basic example

Use inlineFlex() to lay out an element's children as a flex row while the element itself flows inline with the text:

Ask Ada Lovelace to review the change before it ships.
tsx
<div mix={[is(96), ...]}>
	Ask{" "}
	<span
		mix={[
			inlineFlex(),
			items("center"),
			gap(1.5),
			pi(2),
			rounded("full"),
			bg("brand.tint"),
			fg("brand.emphasis"),
		]}
	>
		<span mix={[is(2), bs(2), rounded("full"), bg("success.solid")]} />
		Ada Lovelace
	</span>{" "}
	to review the change before it ships.
</div>

Applying on a state

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

typescript
u.hover(u.inlineFlex())

Responsive design

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

typescript
u.at("md", u.inlineFlex())

Signature

typescript
u.inlineFlex()
@sdxc/u

Can’t find it? Contact us