4.0.2 • Published 9 months ago

flexpad v4.0.2

Weekly downloads
11
License
MIT
Repository
github
Last release
9 months ago

Flexpad

Flexpad is a set of CSS classes to quickly make any flexbox layout using opinionated naming conventions.

How it works

- Choose an axis for your container: x or y
- Think of a keypad:  1 2 4
                      4 5 6
                      7 8 9
- Pick the number corresponding to the alignment you want for your content
- Assign the class to your container:
<div class="x5">
  <div>All centered</div>
</div>
<div class="y1">
  <div>Top left y aligned</div>
</div>

Have a look at the demo for all the 348 variations.

Usage

JavaScript

npm install flexpad --save

Inject CSS:

import 'flexpad/dist/flexpad.css'
// or, prefixed and minified
import 'flexpad/dist/flexpad.min.css'

Use with inline styles:

import fp from 'flexpad'

const Menu = () => (
  <div style={fp('x5b')}>
    // ...
  </div>
)

HTML

Download the CSS file: basic or prefixed and minified.

Use a CDN:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flexpad@4.0.2/dist/flexpad.min.css">

Contributing

Yes, thank you.

4.0.2

9 months ago

3.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.0.0

3 years ago

2.0.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.2.1

5 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago