Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flex-grid-element

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flex-grid-element

A powerful flex based grid system

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 01 Jun 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc