Measured entry
hextaui-aspect-ratio
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.



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.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | flagged at 375 |
| Axe critical | 0 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 31.2 KB (96.7 KB build, 65.5 KB baseline) |
| Bare mode | OK |
| Provider required | NO |
| Demo used | written 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
| Declared dependencies | @radix-ui/react-aspect-ratio, clsx, tailwind-merge |
|---|---|
| Missing on install | none |
| Bare install | builds and mounts without the shadcn-style helpers |
| Provider | no 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.
Author repository
github.com/preetsuthar17/HextaUIAlternatives
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.
- tailark-veil-content-1minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 17.6KB
- Bare
- pass
- Prov
- NO
- tailark-veil-content-2minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 17.6KB
- Bare
- pass
- Prov
- NO
- tailark-mist-content-3minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 24.1KB
- Bare
- pass
- Prov
- NO
- neobrutalism-cardbrutalism
- Renders
- YES
- A11y
- 0
- Gzip
- 29.6KB
- Bare
- pass
- Prov
- NO
- neobrutalism-ncardbrutalism
- Renders
- YES
- A11y
- 0
- Gzip
- 29.6KB
- Bare
- pass
- Prov
- NO
- reui-icon-stackminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 30.1KB
- Bare
- pass
- Prov
- NO