Socket
Socket
Sign inDemoInstall

flex-grid-element

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    flex-grid-element

A powerful flex based grid system


Version published
Weekly downloads
7
Maintainers
1
Created
Weekly downloads
 

Readme

Source

flex-grid

NPM Downloads

A powerful flex based grid system

Introduction

Bootstrap 5 grid weights about 51kb minified. flex-grid, on the other hand, weights 4kb of css + 2 kb of js and provide a similar feature set. Only 4kb of blocking css are between you are your dream layout!

How to use

Simply include the library

<script src="flex-grid.js"></script>

And use your grid

<flex-grid>
  <div>Col 1</div>
  <div>Col 2</div>
  <div>Col 3</div>
</flex-grid>

Why a custom element ?

The custom element is just a convenience around setting the custom styles

It just makes the whole thing neat. Also, it allows targeting of elements based on their attributes in css.

<flex-grid md="3" lg="4">
  <div>col 1 of md=3/lg=4</div>
  <div>col 2 of md=3/lg=4</div>
  <div>col 3 of md=3/lg=4</div>
  <div>col 4 of md=3/lg=4</div>
</flex-grid>

Also, using attributes makes it very clear what is related to the layout when classes can mean various things.

Demo and more

For usage, please look at the demo

See demo.html or https://codepen.io/lekoalabe/pen/ExWowBM

Keywords

FAQs

Last updated on 01 Jun 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc