AspectRatio() — ui Function Reference
Architecture documentation for the AspectRatio() function in aspect-ratio.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 3175e0db_d018_41f2_90d3_0aadf9e7d03f["AspectRatio()"] 08ba85bc_4a72_7534_97c6_c051ae00d1a0["aspect-ratio.tsx"] 3175e0db_d018_41f2_90d3_0aadf9e7d03f -->|defined in| 08ba85bc_4a72_7534_97c6_c051ae00d1a0 style 3175e0db_d018_41f2_90d3_0aadf9e7d03f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/base/ui/aspect-ratio.tsx lines 3–20
function AspectRatio({
ratio,
className,
...props
}: React.ComponentProps<"div"> & { ratio: number }) {
return (
<div
data-slot="aspect-ratio"
style={
{
"--ratio": ratio,
} as React.CSSProperties
}
className={cn("relative aspect-(--ratio)", className)}
{...props}
/>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does AspectRatio() do?
AspectRatio() is a function in the ui codebase, defined in apps/v4/registry/bases/base/ui/aspect-ratio.tsx.
Where is AspectRatio() defined?
AspectRatio() is defined in apps/v4/registry/bases/base/ui/aspect-ratio.tsx at line 3.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free