UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

shadcn/ui/Aspect Ratio

Data display
1 of 2
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

2 versions·2 libraries

  • shadcn/ui
  • HextaUI

Aspect Ratio

npx shadcn@latest add https://ui.shadcn.com/r/styles/new-york-v4/aspect-ratio.json
Open in v0 Docs Repo
Library
shadcn/ui
License
MIT
Stack
React · Tailwind CSS · radix
Packages
radix-ui
Size
12 lines
Demo
From shadcn/ui

Code

registry/new-york-v4/ui/aspect-ratio.tsx

"use client"

import { AspectRatio as AspectRatioPrimitive } from "radix-ui"

function AspectRatio({
  ...props
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
  return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
}

export { AspectRatio }

More like this

Drape Background

Kokonut UI·Backgrounds

Noise Texture

Magic UI·Backgrounds

Card Nav

React Bits·NavigationMIT+

Family Button

Cult UI·Buttons

Bubble Menu

React Bits·BackgroundsMIT+

Map

Eldora UI·Media & 3D

Gravity Stars Background

Animate UI·BackgroundsMIT+

Ai Message

SmoothUI·Backgrounds

Ai Reasoning

SmoothUI·Media & 3D

8-bit Slider

8bitcn·Inputs & forms

8-bit Health Bar

8bitcn·Feedback & loaders

8-bit Mana Bar

8bitcn·Feedback & loaders

8-bit Progress

8bitcn·Feedback & loaders

Scroll Index

Kokonut UI·Text effects

Grid Pattern

Magic UI·Backgrounds