All Projects β†’ leefsmp β†’ Re Flex

leefsmp / Re Flex

Licence: mit
Resizable Flex layout container components for advanced React web applications

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Re Flex

Primereact
The Most Complete React UI Component Library
Stars: ✭ 2,393 (+585.67%)
Mutual labels:  flex, react-components
griding
🧱 lean grid & responsive for react
Stars: ✭ 18 (-94.84%)
Mutual labels:  responsive, layout
Core Layout
Flexbox & CSS-style Layout in Swift.
Stars: ✭ 215 (-38.4%)
Mutual labels:  flex, layout
Styled Bootstrap Components
The bootstrap components made with styled-components πŸ’…
Stars: ✭ 196 (-43.84%)
Mutual labels:  layout, react-components
bootstrap-grid-ms
Missing grid range in Bootstrap 3, micro-small from 480-767px.
Stars: ✭ 34 (-90.26%)
Mutual labels:  responsive, layout
Waffle Grid
An easy to use flexbox grid system.
Stars: ✭ 602 (+72.49%)
Mutual labels:  flex, responsive
react-super-styled
Responsive JSX layouts with Styled Components
Stars: ✭ 77 (-77.94%)
Mutual labels:  responsive, layout
Jafar
🌟!(Just another form application renderer)
Stars: ✭ 107 (-69.34%)
Mutual labels:  layout, react-components
vue-layout-system
A pack of Vue components that solve daily layout problems
Stars: ✭ 31 (-91.12%)
Mutual labels:  flex, layout
rebass
βš›οΈ React primitive UI components built with styled-system.
Stars: ✭ 7,844 (+2147.56%)
Mutual labels:  layout, react-components
Grid
This package has moved and renamed
Stars: ✭ 2,079 (+495.7%)
Mutual labels:  layout, responsive
vue-smart-widget
πŸ—ƒοΈSmart widget is a flexible and extensible content container component for Vue2.x / Vue3.x in Next branch.
Stars: ✭ 110 (-68.48%)
Mutual labels:  layout, resizable
Shuffle
Categorize, sort, and filter a responsive grid of items
Stars: ✭ 2,170 (+521.78%)
Mutual labels:  layout, responsive
React Flexa
Responsive React Flexbox (CSS Flexible Box Layout Module) grid system based heavily on the standard CSS API.
Stars: ✭ 120 (-65.62%)
Mutual labels:  flex, responsive
Mui Treasury
A collection of ready-to-use components based on Material-UI
Stars: ✭ 1,821 (+421.78%)
Mutual labels:  layout, react-components
flexboxes
CSS flexbox framework with pure flexbox grid ability
Stars: ✭ 27 (-92.26%)
Mutual labels:  flex, layout
Easygrid
EasyGrid - VanillaJS Responsive Grid
Stars: ✭ 77 (-77.94%)
Mutual labels:  layout, responsive
React Native Flexbox Grid
Responsive Grid for React Native
Stars: ✭ 95 (-72.78%)
Mutual labels:  layout, responsive
react-native-bootstrap-styles
Bootstrap style library for React Native
Stars: ✭ 95 (-72.78%)
Mutual labels:  responsive, layout
react-aspect-ratio
Preserve space for your element to prevent browser reflow (layout shift)
Stars: ✭ 94 (-73.07%)
Mutual labels:  responsive, layout

re-flex

About Re-F|ex

Re-F|ex is a React flex-based layout component library which I created because none of the components I found out there could satisfy my requirements.

It intends to address in a simple way the needs of advanced React Web applications that require resizable layouts.

Here is a basic demo:

import ReactDOM from 'react-dom'
import React from 'react'

import {
  ReflexContainer,
  ReflexSplitter,
  ReflexElement
} from 'react-reflex'

import 'react-reflex/styles.css'

/////////////////////////////////////////////////////////
// Basic vertical re-flex layout with splitter
// Adding a splitter between two ReflexElements
// will allow the user to resize them
//
/////////////////////////////////////////////////////////
class ReflexDemo extends React.Component {

  render () {

    return (
      <ReflexContainer orientation="vertical">

        <ReflexElement className="left-pane">
          <div className="pane-content">
            Left Pane (resizeable)
          </div>
        </ReflexElement>

        <ReflexSplitter/>

        <ReflexElement className="right-pane">
          <div className="pane-content">
            Right Pane (resizeable)
          </div>
        </ReflexElement>

      </ReflexContainer>
    )
  }
}

ReactDOM.render(
  <ReflexDemo/>,
  document.getElementById('reflex-demo'))

Installation

npm install react-reflex

ES6, CommonJS, and UMD builds are available with each distribution.

// You will need to import the styles separately
// You probably want to do this just once during the bootstrapping phase of your application.
import 'react-reflex/styles.css'

// then you can import the components
import {
  ReflexContainer,
  ReflexSplitter,
  ReflexElement
} from 'react-reflex'

You can also use the UMD build

<link rel="stylesheet" href="path-to-react-reflex/styles.css">
<script src="path-to-react-reflex/dist/umd/react-reflex.min.js"></script>

React Support

React >= 0.13.x

Browser Support

Re-F|ex is responsive, mobile friendly and has been tested on the following browsers:

IE Chrome Firefox Opera Safari Edge
IE 11+ βœ” Latest βœ” Latest βœ” Latest βœ” Latest βœ” Latest βœ”

Documentation & Samples

Re-F|ex is the most powerful resizeable React layout component out there ... Don't just trust me, try it!

Click here for code samples and live demos ...

re-flex-demo

  • Supported properties on ReflexContainer:

    • orientation: Orientation of the layout container. Type: oneOf(['horizontal', 'vertical']). Default value: horizontal.

    • maxRecDepth: Maximun recursion depth to solve initial flex of layout elements based on user provided values. This prevents infinite recursion in case the constraints solver cannot find suitable dimensions on the elements to satisfy initial inputs.
      Type: number. Default value: 100.

    • windowResizeAware: When set to true, this flag will update the layout upon a window resize event to attempt to satisfy minSize/maxSize constraints on each element. If your elements do not have those constraints, this is not needed. Type: bool. Default value: false.

    • className: Space separated classnames to apply custom styles on the component. Type: string. Default value: empty string ''.

    • style: allows passing inline style to the container. Type: object. Default value: {}.

  • Supported properties on ReflexElement:

    • propagateDimensions: Setting this to true will propagate a dimensions {height, width} property to the children. See Size-aware element demo for more details. Type: bool. Default value: false.

    • propagateDimensionsRate: When resizing with propagateDimensions={true}, defines the rate at which the dimensions will be updated on the child elements (in times per second). This can help improving performances when using this approach on heavy components by skipping some rerender steps during resizing. Type: number. Default value: 100.

    • resizeHeight: Allows to control if height will be propagated when propagateDimensions={true}.
      Type: bool. Default value: true.

    • resizeWidth: Allows to control if width will be propagated when propagateDimensions={true}.
      Type: bool. Default value: true.

    • size: Allows to control the size in pixel of an element. The main use-case is to allow to perform animations programmatically on an element (shrinking/expanding). See Controlled elements demo for more details. Type: number. Default value: true.

    • minSize: Creates a constraint on the minimum size in pixel to which the element can be resized to by the user. Type: number. Default value: true.

    • maxSize: Creates a constraint on the maximun size in pixel to which the element can be resized to by the user. Type: number. Default value: true.

    • flex: Specifiy the initial flex of an element. By default all element will get evenly displayed inside a layout, unless some of them have minSize, maxSize or size specified. Type: number. Default value: true.

    • direction: Allows to control in which direction(s) the element will shrink/expand when its size property is modified. See Controlled elements demo for more details. Type: -1, 1 or [-1, 1]. Default value: 1.

    • onStartResize: Event fired when user initiates layout resizing. Type: function({domElement, component}). Default value: undefined.

    • onStopResize: Event fired when user finishes layout resizing. Type: function({domElement, component}). Default value: undefined.

    • onResize: Event fired at each resize step when user resizes layout. Type: function({domElement, component}). Default value: undefined.

    • className: Space separated classnames to apply custom styles on the component. Type: string. Default value: empty string ''.

    • style: allows passing inline style to the container.
      Type: object. Default value: {}.

  • Supported properties on ReflexSplitter:

    • propagate: Propagate the drag when reszing a layout across multiple splitters. Layou must have at least 3 elements with therefore 2 splitters for this properties to be relevant. Type: bool. Default value: false.

    • onStartResize: Event fired when user initiates layout resizing. Type: function({domElement, component}). Default value: undefined.

    • onStopResize: Event fired when user finishes layout resizing. Type: function({domElement, component}). Default value: undefined.

    • onResize: Event fired at each resize step when user resizes layout. Type: function({domElement, component}). Default value: undefined.

    • className: Space separated classnames to apply custom styles on the component. Type: string. Default value: empty string ''.

    • style: allows passing inline style to the container.
      Default value: {}. Type: object.

Development

  • Build the lib: npm run build | npm run build-dev (dev mode non-minified with source-map)
  • Build the demo: npm run build-demo | npm run build-demo-dev (dev mode non-minified with source-map + webpack watch)

Web Applications using Re-F|ex

See here...

(Feel free to add your own by submitting a pull request...)

About the Author

https://twitter.com/F3lipek

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].