@neupauer/tailwindcss-plugin-aspect-ratio weekly downloads statistics
By neupauer (2 listings) · npm · Tailwind plugins
A Tailwind CSS plugin for aspect ratio.
@neupauer/tailwindcss-plugin-aspect-ratio has 6 recorded weekly downloads on npm, a decrease of 33.3% over the past 30 days, ranking #2157 of 2,322 tracked listings.
About @neupauer/tailwindcss-plugin-aspect-ratio
Tailwind CSS Plugin – Aspect Ratio
<p align="center"> <img src="assets/screenshot.png" alt="Screenshot" /> </p>Install
- Install the plugin:
# Using npm
npm install @neupauer/tailwindcss-plugin-aspect-ratio --save-dev
# Using Yarn
yarn add @neupauer/tailwindcss-plugin-aspect-ratio -D
- Add it to your
tailwind.config.jsfile:
// tailwind.config.js
module.exports = {
// ...
plugins: [require("@neupauer/tailwindcss-plugin-aspect-ratio")],
};
Configuration
By default, some common aspect ratios are provided, but you can override or extend them with the aspectRatio key in your tailwind.config.js file.
// tailwind.config.js
module.exports = {
theme: {
// default
aspectRatio: {
// Square
"1:1": 1,
// Landscape
"2:1": 2 / 1,
"3:1": 3 / 1,
"3:2": 3 / 2,
"4:1": 4 / 1,
"4:3": 4 / 3,
"5:4": 5 / 4,
"16:9": 16 / 9,
"16:10": 16 / 10,
"19:10": 19 / 10,
"21:9": 21 / 9,
// Portrait
"1:2": 1 / 2,
"1:3": 1 / 3,
"2:3": 2 / 3,
"1:4": 1 / 4,
"3:4": 3 / 4,
"4:5": 4 / 5,
"9:16": 9 / 16,
"10:16": 10 / 16,
"10:19": 10 / 19,
"9:21": 9 / 21,
},
},
variants: {
// default
aspectRatio: ["responsive"],
},
};
Usage
The target element can only contain one child, the others will be hidden. If you need to add more child, wrap them within another element e.g.,
<div>
<div class="aspect-ratio-16:9">
<img src="image.jpg" class="object-cover" />
</div>
<div class="aspect-ratio-16:9">
<div class="text-white bg-blue-500">Aspect Ratio</div>
</div>
<!-- OK -->
<div class="aspect-ratio-16:9">
<div>
<p>Aspect</p>
<p>Ratio</p>
</div>
</div>
<!-- NOOK -->
<div class="aspect-ratio-16:9">
<img src="image1.jpg" class="object-cover" />
<!-- visible-->
<img src="image2.jpg" class="object-cover" />
<!-- hidden-->
<img src="image3.jpg" class="object-cover" />
<!-- hidden-->
</div>
Min-Aspect Ratio
<div class="min-aspect-ratio-16:9">
<p>Aspect Ratio</p>
</div>
<div class="min-aspect-ratio-16:9">
<p>
Aspect Ratio. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Eius ullam iste distinctio nobis ipsum soluta dolorem esse omnis! Architecto
impedit odio magni non repudiandae vitae veniam id dolorum sint eum. Lorem
ipsum dolor sit amet, consectetur adipisicing elit. Eius ullam iste
distinctio nobis ipsum soluta dolorem esse omnis! Architecto impedit odio
magni non repudiandae vitae veniam id dolorum sint eum.
</p>
</div>
Description from the npm listing.
- tailwind
- tailwindcss
- plugin
- tailwindcss-plugin
- aspect-ratio
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (544)Similar npm Tailwind plugins plugins
All 20 @neupauer/tailwindcss-plugin-aspect-ratio alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@neupauer/tailwindcss-plugin-aspect-ratio. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.