Aurora Aspect Ratio
aurora-dinglebear-ai/aurora-aspect-ratioFreeComponent
Fixed-ratio media wrapper for previews, charts, and embedded surfaces.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-aspect-ratio.jsonSource
1"use client"23import * as React from "react"4import { cn } from "@/lib/utils"56export interface AspectRatioProps extends React.HTMLAttributes<HTMLDivElement> {7 ratio?: number8}910function AspectRatio({ ref, className, ratio = 16 / 9, style, ...props }: AspectRatioProps & { ref?: React.Ref<HTMLDivElement> }) {11 return (12 <div13 ref={ref}14 className={cn("relative w-full overflow-hidden", className)}15 style={{16 aspectRatio: `${ratio}`,17 ...style,18 }}19 {...props}20 />21 )22}2324export { AspectRatio }25export default AspectRatio
What it pulls in
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora Accordionaurora-accordion | aurora | Components | Free | 2 deps | |
| Aurora Alert Dialogaurora-alert-dialog | aurora | Components | Free | 2 deps | |
| Aurora Avataraurora-avatar | aurora | Components | Free | 1 dep | |
| Aurora Badgeaurora-badge | aurora | Components | Free | 2 deps | |
| Aurora Banneraurora-banner | aurora | Components | Free | 1 dep | |
| Aurora Breadcrumbaurora-breadcrumb | aurora | Components | Free | 2 deps | |
| Aurora Buttonaurora-button | aurora | Components | Free | 2 deps | |
| Aurora Button Groupaurora-button-group | aurora | Components | Free | no deps |
