GitHub

Img

Responsive image container with shapes, loading skeleton, error states, and aspect ratios.

Basic Image

Sample image

Shapes

Rounded
Circle
Default

Aspect Ratios

Square
16:9
3:4

Sizes

XS
SM
MD
LG

Skeleton Loading

Error State

Failed to load image

Reference

Class Description
.imgBase image container
.img-elementThe <img> element inside container
.img-roundedRounded corners (radius-box)
.img-circleCircular shape
.img-containObject-fit: contain
.img-coverObject-fit: cover (default)
.img-fillObject-fit: fill
.img-square1:1 aspect ratio
.img-video16:9 aspect ratio
.img-portrait3:4 aspect ratio
.img-landscape4:3 aspect ratio
.img-wide21:9 aspect ratio
.img-xs / sm / md / lg / xlFixed size variants (32-200px)
.img-loadedShows image, hides skeleton
.img-errorShows error state
.img-skeletonShimmer loading placeholder
.img-placeholderIcon placeholder
.img-error-displayError state overlay
.img-lqipLow-quality image placeholder (blur-up)
.img-fadeFade-in animation on load
.img-zoomZoom-in animation on load
.img.glassGlassmorphism variant