Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

rebass

2.3.4 • Public • Published

Rebass

React UI component library & design system, built with styled-system, with support for styled-components & emotion.

Build Status Coverage Downloads Version

https://rebassjs.org

Docs for v2:: https://rebass-v2.now.sh

npm i rebass

Rebass is a library of highly-composable, primitive UI components for React, built with styled-components to keep styles isolated and reduce the need to write custom CSS in your application. Based upon a configurable design system, Rebass‘s props API makes building consistent, responsive web apps simpler and faster.

Getting Started

import React from 'react'
import { Provider, Heading, Button } from 'rebass'
 
const App = props => (
  <Provider>
    <Heading>Hello</Heading>
    <Button>Rebass</Button>
  </Provider>
)

To use Rebass with emotion, import from rebass/emotion:

import * as Rebass from 'rebass/emotion'

Features

  • Kickstart your own React component library
  • Responsive style props from styled-system
  • Flexbox grid with Rebass Grid
  • Support for styled-components & emotion
  • Functional stateless UI components
  • Configurable theming
  • Extensible base components
  • Design-system based consistency
  • Built for responsive web design

"One of the best React component libs out there" – Max Stoiber

"Rebass is the Bootstrap of React." – Jori Lallo

"A whopper component library built on styled-components. Responsive, systematic, scalable...the business!" – Colm Tuite

Documentation

CodeSandbox

Try it out:

https://codesandbox.io/s/github/rebassjs/rebass/tree/master/examples/sandbox

Architectural Approach

Rebass is built around a component architectural approach inspired by Dan Abramov’s Presentational and Container Components, where presentational components are the only ones that encapsulate styles and contain no application logic, and container components do not contain any styles or DOM markup and handle all the application logic.

Rebass only contains presentational components, which means controlling things like progressive disclosure mechanisms or dropdown menus should be handled at a higher level in container components. Therefore, Rebass itself does not require any client-side JavaScript, is well suited to server-side rendering, and can fit into virtually any higher level application architecture.

See Patterns for Style Composition in React for more on some of the thought behind Rebass.

Related

v1.0.7

For the previous version of Rebass see the v1.0.7 branch.


Contributing | MIT License

install

npm i rebass

Downloadsweekly downloads

6,129

version

2.3.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability