Measured entry

hextaui-aspect-ratio

cardminimal-flat

A thin client-side wrapper around Radix Aspect Ratio that keeps child media inside a fixed proportion. It ships as a shadcn registry TypeScript component, forwards the primitive ref and props, and uses a local cn helper backed by clsx and tailwind-merge.

Specimen
Harness screenshot of hextaui-aspect-ratio at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of hextaui-aspect-ratio at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of hextaui-aspect-ratio at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for hextaui-aspect-ratio
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal31.2 KB (96.7 KB build, 65.5 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A sound, narrowly scoped wrapper that built and mounted cleanly with no reported accessibility violations. The component itself is reusable, but the supplied demo overflows at the narrow viewport, so teams should make the surrounding width responsive.

Use it if

  • You need predictable image, video, embed, or placeholder proportions before content loads.
  • Your React UI already uses Radix primitives and a Tailwind-aware cn utility.
  • You want a small wrapper that preserves the underlying Radix API instead of introducing a larger card abstraction.

Skip it if

  • Your layout must avoid horizontal overflow in narrow containers without adapting the fixed-width demo shell.
  • A native CSS aspect-ratio utility already covers the use case and another runtime dependency is not justified.
  • You need media loading, fallback, captions, or playback behavior rather than only proportional layout.

Install

Installation record for hextaui-aspect-ratio
Declared dependencies@radix-ui/react-aspect-ratio, clsx, tailwind-merge
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

Add React, the Radix aspect-ratio package, clsx, and tailwind-merge. Provide the @ alias and a local cn helper, or replace that import with your own class combiner. Ensure your build supports client components and include an equivalent touch-manipulation utility if Tailwind is absent.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

License
MIT
Record published
2026-08-16

Alternatives

Other published entries for the card pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.