Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A component-based flexbox grid system for React, built with styled-components and based on the Solved by Flexbox implementation.
Flexomatic is a component-based flexbox grid system for React that renders responsive layouts through a minimal Grid and Cell API built on styled-components.
Flexomatic is a lightweight, component-based flexbox grid system for React, built with styled-components and following the grid methodology from Philip Walton's Solved by Flexbox. It provides two main components: Grid, the row container, and Cell, the column. Flexomatic accepts styled-components as a peer dependency, meaning your project must already have styled-components installed to use it. Its goal is to expose a minimal grid system without a large set of options, letting you compose responsive layouts with a few props.
After installing Flexomatic with yarn add flexomatic and ensuring styled-components is present, you import Grid and Cell from the library and compose them in your React tree. The Grid component acts as a flex row, and each Cell becomes a flex item. Props such as width, direction, align, spacing, flexCells, and flexed map directly to CSS flexbox properties and media queries, so the layout logic stays in your component code.
Yes. Flexomatic lists styled-components as a peer dependency, so you must install styled-components in your project before you can use Flexomatic.
Run yarn add flexomatic in your project. Flexomatic's only requirement is that styled-components is already installed.
Flexomatic supports the keywords full (100%), half (50%), third (33.33%), and fourth (25%) for the width prop. You can also use numbers between 0 and 1.
Flexomatic supports three screen sizes: base with no media query, tablet at 768px, and desktop at 1024px. The width array expects up to three values in that order.
Passing more than three values in the width array will result in an error, as Flexomatic only handles base, tablet, and desktop widths.
