New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

flexalign-css

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flexalign-css

A lightweight CSS utility library for flexbox alignment

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

FlexAlign.css

A lightweight, zero-dependency CSS utility library for flexbox alignment. Easily align and distribute items in your layouts with simple, intuitive class names.

Features

  • 🚀 Lightweight (less than 1KB minified)
  • 📦 Zero dependencies
  • 🎯 Simple and intuitive class names
  • 🔧 Covers all flexbox alignment properties
  • 📱 Works with any framework or vanilla HTML
  • 🎨 Easy to integrate into existing projects

Installation

CDN

Include FlexAlign.css in your HTML using a CDN:

<!-- Full version -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/swapnilddixit91/flexalign-css@1.0.0/flexalign.css">

<!-- Minified version (recommended for production) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/swapnilddixit91/flexalign-css@1.0.0/flexalign.min.css">

NPM

Install via npm:

npm install flexalign-css

Then import in your CSS or JavaScript:

@import 'flexalign-css';
import 'flexalign-css';

Download

Download the flexalign.css or flexalign.min.css file and include it in your project:

<link rel="stylesheet" href="path/to/flexalign.min.css">

Usage

Basic Setup

Add the flex class to enable flexbox on a container, then use alignment utilities:

<div class="flex justify-center align-center">
  <div>Centered content</div>
</div>

Class Reference

Display

ClassCSS Property
.flexdisplay: flex
.flex-inlinedisplay: inline-flex

Justify Content (Horizontal Alignment)

ClassCSS PropertyDescription
.justify-startjustify-content: flex-startAlign items to the left (start)
.justify-endjustify-content: flex-endAlign items to the right (end)
.justify-centerjustify-content: centerCenter items horizontally
.justify-betweenjustify-content: space-betweenEqual spacing between items
.justify-aroundjustify-content: space-aroundEqual spacing around items
.justify-evenlyjustify-content: space-evenlyEqual spacing between and around items

Align Items (Vertical Alignment)

ClassCSS PropertyDescription
.align-startalign-items: flex-startAlign items to the top (start)
.align-endalign-items: flex-endAlign items to the bottom (end)
.align-centeralign-items: centerCenter items vertically
.align-stretchalign-items: stretchStretch items to fill container
.align-baselinealign-items: baselineAlign items by their baseline

Flex Direction

ClassCSS PropertyDescription
.flex-rowflex-direction: rowHorizontal direction (default)
.flex-row-reverseflex-direction: row-reverseHorizontal, reversed
.flex-columnflex-direction: columnVertical direction
.flex-column-reverseflex-direction: column-reverseVertical, reversed

Flex Wrap

ClassCSS PropertyDescription
.flex-wrapflex-wrap: wrapAllow items to wrap
.flex-nowrapflex-wrap: nowrapPrevent wrapping (default)
.flex-wrap-reverseflex-wrap: wrap-reverseWrap in reverse order

Examples

Center Everything

<div class="flex justify-center align-center" style="height: 300px;">
  <div>Perfectly centered!</div>
</div>

Space Between with Vertical Center

<div class="flex justify-between align-center">
  <div>Left</div>
  <div>Middle</div>
  <div>Right</div>
</div>

Column Layout

<div class="flex flex-column align-center">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
</div>

Responsive Card Grid

<div class="flex flex-wrap justify-around">
  <div class="card">Card 1</div>
  <div class="card">Card 2</div>
  <div class="card">Card 3</div>
</div>

Browser Support

FlexAlign.css works in all modern browsers that support flexbox:

  • Chrome 29+
  • Firefox 28+
  • Safari 9+
  • Edge 12+
  • Opera 17+

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

Changelog

Version 1.0.0

  • Initial release
  • Core flexbox alignment utilities
  • Justify content classes
  • Align items classes
  • Flex direction and wrap classes

Credits

Created and maintained by the FlexAlign CSS community.

Keywords

css

FAQs

Package last updated on 24 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts