Socket
Socket
Sign inDemoInstall

reactrix-flex

Package Overview
Dependencies
6
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    reactrix-flex

Lightweight Flex Component For React


Version published
Maintainers
1
Install size
17.2 kB
Created

Readme

Source

Reactrix Flex

Lightweight Flex Component For React

NPM JavaScript Style Guide Travis

Install

npm install --save reactrix-flex
yarn add reactrix-flex

Usage

import React, { Component } from 'react'
import ReactrixFlex from 'reactrix-flex'

class Flex extends Component {
  render () {
    const options = {
      breakPoints: [ 640, 900, 1200 , 1400],
      rowItems: [ 2, 3, 4, 5]
    }
    return (
      <ReactrixFlex {...options}>
        <div>Flex Item</div>
        <div>Flex Item</div>
      </ReactrixFlex>
    )
  }
}

Features

  • Only two peer depencies (react/prop-types) ✔️
  • Works great on all devices/browsers ✔️
  • Easy to use BEM class hooks ✔️

Examples

Props

PropTypeDefaultDescription: Options
breakPointsarray[ 600, 900, 1280]Screen width: number
rowItemsarray[ 2, 3, 4 ]Item count: number

Classes

ClassDescription
.flexOuter component wrapper
.flex__cotainerInner component wrapper
.flex__itemItem outer wrapper
.flex__contentItem inner wrapper

Development

Follow these steps to setup a local development environment. Use yarn or npm - not both.

  1. Clone the repo from Github
git clone https://github.com/alexcasche/react-sidebar
  1. Setup project & start rollup watch
npm install && npm start
yarn install && yarn add
  1. Setup react app & start dev server
cd example
npm install && npm start
yarn install && yarn start

Shoutout

Interested in publishing your own packages? Checkout create-react-library 🙌

License

MIT © alexcasche

Keywords

FAQs

Last updated on 08 May 2018

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