Aspect Ratio
Preview
Install
Add it with your package manager, or copy the source manually.
Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide
Download the release archive to your project root, then install the local file.
Import the shared styles once in your application.
TSUsage
API Reference
AspectRatio
ratio?numberWidth divided by height, for example 16 / 9. Must be finite and positive.
Default
1animated?booleanMorph layout changes. Reduced motion always skips movement.
Default
truecontentClassName?stringClasses for the content layer, such as alignment or padding.
Default
—class?stringDefault
—AspectRatioImage
altstringDefault
—widthnumberIntrinsic width in pixels, used to reserve the image's cover crop.
Default
—heightnumberIntrinsic height in pixels. Keep these dimensions accurate for the source.
Default
—class?stringDefault
—draggable?booleanDefault
—Updated