Skip to content

Bento & Layout

Aspect-Ratio Media Box

Reserves a stable aspect ratio for media to prevent layout shift, using the native CSS aspect-ratio property.

SubscriptionIncluded with the Velocity Components subscription.
$velocityx add aspect-ratio-box
Props & docs

Needs a licence key — subscribe here, then velocityx loginonce.

AstroReactTailwind CSSNew

Aspect-Ratio Media Box

Aspect-Ratio Media Box

Live preview of the Aspect-Ratio Media Box component

16/9

1/1

3/4

The code ships with Velocity.

Every component's full source — copy-paste ready, yours to edit — comes with any Velocity package. Buy once, own the code forever.

Get Velocity X — from $1,250 See all packages →

Using the Aspect-Ratio Media Box component

Every Velocity component is plain Astro or React markup styled with Tailwind utility classes. There is no proprietary runtime and no design-system wrapper to adopt — the component inherits whatever colour and type tokens your project already defines.

Browse all →