Pixelwind

Documentation

Everything you need to know about using Pixelwind in your projects.

What is Pixelwind?

Pixelwind is a lightweight, utility-first CSS package built for developers who want exact control over spacing and sizing. Instead of abstract scales or configuration files, it offers clear, pixel-based utility classes for padding, margin, gap, width, and height.

The class name directly represents the value applied, making layouts predictable, readable, and easy to maintain—especially when working with pixel-perfect designs.

Installation

NPM

Install Pixelwind via npm:

npm install pixelwind

Then import it in your project:

import 'pixelwind';

CDN

Include Pixelwind directly in your HTML:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixelwind@1.0.2/pixelwind.min.css">

Usage

Using Pixelwind is intentionally simple. After installing it via npm or including the stylesheet directly, you can start applying utilities in your markup immediately.

For example, adding p-10px applies 10 pixels of padding, mb-20px adds a 20-pixel bottom margin, and w-120px sets an element's width to exactly 120 pixels.

There is no build step, no configuration, and no mental mapping between class names and values—what you write is what you get.

Example

<div class="p-20px m-10px w-200px h-100px gap-15px">
  Pixel-perfect spacing
</div>

Available Classes

space_bar Margin

Control element margins with pixel precision.

m-{'{1-30}'}px

All sides

mt-{'{1-30}'}px

Top

mr-{'{1-30}'}px

Right

mb-{'{1-30}'}px

Bottom

ml-{'{1-30}'}px

Left

padding Padding

Add internal spacing to elements.

p-{'{1-30}'}px

All sides

pt-{'{1-30}'}px

Top

pr-{'{1-30}'}px

Right

pb-{'{1-30}'}px

Bottom

pl-{'{1-30}'}px

Left

px-{'{1-30}'}px

Horizontal

py-{'{1-30}'}px

Vertical

grid_view Gap

Control spacing between flex and grid items.

gap-{'{1-30}'}px

Both directions

aspect_ratio Width & Height

Set exact dimensions for elements.

w-{1-30}px

Width (1px steps)

w-{40-300}px

Width (10px steps)

h-{1-30}px

Height (1px steps)

h-{40-300}px

Height (10px steps)

text_fields Font Size

Set precise font sizes.

text-{'{1-30}'}px

Font size

devices Responsive (1600px+)

Margin, padding, gap, width, and height utilities are available with the -1600 suffix for screens 1600px and wider. The values are automatically scaled up.

<div class="p-10px p-10px-1600">
  10px padding by default, 13.333px on large screens
</div>

Philosophy

Pixelwind fits naturally into any frontend setup, whether you're writing plain HTML or working inside a modern JavaScript framework. It can be used on its own or alongside other styling approaches without conflict. By focusing only on spacing and sizing, Pixelwind stays small, fast, and opinionated in the right way: it helps you translate designs directly into code with confidence and precision, while keeping your markup clean and expressive.