react-bootstrap-columns

Very simple text flow column React component


License
MIT
Install
npm install react-bootstrap-columns@0.1.0

Documentation

react-bootstrap-columns

React Component for text flow columns

Use to flow text between a number of bootstrap columns.

It is a very simple component.

Is only useful for bootstrap / react projects

Current Limitations

  1. Does not split across paragraphs
  2. Uses only one bootstrap size class

Install

clone this repository. Do not use npm version... its broken

Example

To render this sort of layout:

First Paragraph Third Paragraph and so on
Second Paragraph

Use this:

const React = require('react'),
    Columns = require('react-bootstrap-columns');

const Content = React.createClass({

    const columnStyle = {
        textAlign: "justify",
        fontFamily: font.family,
        fontSize: font.size,
        fontWeight: font.weight,
        lineHeight: font.lineHeight
    };

    render: function () {
        return (
            <div className="row">
                <div className="col-md-12">
                <Columns columns={2}
                    columnSize='md'
                    style={columnStyle}>
                
                    <span>
                        First paragraph
                    </span>
                    
                    <span>
                        Second paragraph
                    </span>
                    
                    <span>
                        Third paragraph and so on
                    </span>
                    
                </Columns>

               
                </div>
            </div>
        );
    }
});