Skip to content
GitHub

Aspect Ratio

Wrapper that maintains aspect ratio for content.

1:1

Installation

Usage

Examples

Square

1:1

Portrait

9:16

Video

16:9

Responsive

Use [--ratio:*] with breakpoints to change the ratio at different screen sizes.

4:3 → 16:9 → 1:1

API Reference

AspectRatio

Main wrapper that preserves aspect ratio for its children using CSS.