Aspect Ratio
Holds media at a fixed ratio so the layout doesn't jump while it loads.
Usage
import { AspectRatio } from "@zynactra/ui/aspect-ratio"<AspectRatio ratio={16 / 9}>
<img src="/cover.jpg" alt="Project cover" className="size-full object-cover" />
</AspectRatio>Guidelines
- Use
16 / 9for video and heroes,1for avatars and thumbnails,4 / 3for screenshots. - Put the placeholder on the
AspectRatioitself (bg-surface-sunken), so empty and loading states keep the same shape. - Images inside need
object-coverand realalttext.