Skip to content

A responsive flex container for React, created as a npm packagešŸ“¦

Notifications You must be signed in to change notification settings

JesperBry/holy-albatross

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 

History

12 Commits
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

holy-albatross

A responsive flex container for React, based on the article: The Flexbox Holy Albatross by Heydon Pickering

NPM JavaScript Style Guide

Install

Download latest.tgz, then

npm install --save <path to [email protected]>

Usage

import React, { Component } from 'react'

import { Container } from 'holy-albatross';
import 'holy-albatross/dist/index.css';

class Example extends Component {
  render() {
    return (
      <Container>
        ... YOUR UI ELEMENTS
      </Container>
    );
  }
}

Available props

See example with props here

Key Type Expected Default value Description
gap String/Number '1' Controls the gap between the child components inside the container. Expects a number or a quoted number ('1')
gutter Boolean False When set the container gets a default side gutter of 25%
maxWidth String/Number 'none' Sets the maxWidth for the container (using rem as units). Expects a number or a quoted number ('1')
paddingTop String/Number 'none' Sets the top padding for the container (using rem as units). Expects a number or a quoted number ('1')
paddingBottom String/Number 'none' Sets the bottom padding for the container (using rem as units). Expects a number or a quoted number ('1')

License

MIT Ā© JesperBry