Skip to content

Instantly share code, notes, and snippets.

@PARC6502
Last active August 3, 2018 08:27
Show Gist options
  • Save PARC6502/1a1536a71e2b6445d94dfa9945895a12 to your computer and use it in GitHub Desktop.
Save PARC6502/1a1536a71e2b6445d94dfa9945895a12 to your computer and use it in GitHub Desktop.
React, Css, and UI Notes

React inline style systems

  • jsxstyle: jsxstyle is an inline style system for React and Preact. It provides a best-in-class developer experience without sacrificing performance, and has little regard for existing CSS orthodoxy. Styles are written inline on a special set of components exported by jsxstyle. Inline styles on these components are converted to CSS rules and added to the document right as they’re needed.
  • styled-components: Utilising tagged template literals (a recent addition to JavaScript) and the power of CSS, styled-components allows you to write actual CSS code to style your components. It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier! styled-components is compatible with both React (for web) and React Native – meaning it's the perfect choice even for truly universal apps! See the documentation about React Native for more information.
  • styled-sytem: Design system utilities for styled-components and other css-in-js libraries. NOTE: really keen to try this, seems to build on styled-components and adds some jsxstyle like functionality

React Component Libraries

  • 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.
  • Material-ui: React components that implement Google's Material Design.
  • reakit: Toolkit for building composable, accessible and reliable UIs with React. Note: uses styled-components for styling, has composability in common with semantic-ui-react but more powerful.
  • Extra links

Component Workflow

  • storybook: Storybook is a development environment for UI components. It allows you to browse a component library, view the different states of each component, and interactively develop and test components.
  • codesandbox: CodeSandbox is an online editor that helps you create web applications, from prototype to deployment.

CSS frameworks

  • Tachyons: Functional css for humans. Quickly build and design new UI without writing css.
  • JSS: JSS is a more powerful abstraction over CSS. It uses JavaScript as a language to describe styles in a declarative and maintainable way. It is a high performance JS to CSS compiler which works at runtime and server-side. This core library is low level and framework agnostic. It is about 6KB (minified and gzipped) and is extensible via plugins API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment