layout
position-area
Applies the CSS Anchor Positioning position-area property, placing an anchor-positioned element in a named region of the 3x3 grid around its anchor.
import { positionArea } from "@sdxc/u/layout";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.positionArea("top left") | css({ positionArea: "top left" }) |
u.positionArea("bottom span-right") | css({ positionArea: "bottom span-right" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.positionArea("top left")Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.positionArea("top left"))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.positionArea("top left"))Signature
u.positionArea(value: string)