All Projects → cdonohue → benefit

cdonohue / benefit

Licence: MIT license
✨ Utility CSS-in-JS library that provides a set of low-level, configurable, ready-to-use styles

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to benefit

Xwind
Tailwind CSS as a templating language in JS and CSS-in-JS
Stars: ✭ 249 (+388.24%)
Mutual labels:  emotion, css-in-js, tailwindcss
Xstyled
A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
Stars: ✭ 1,835 (+3498.04%)
Mutual labels:  emotion, css-in-js, tailwindcss
Twin.macro
🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, stitches and goober) at build time.
Stars: ✭ 5,137 (+9972.55%)
Mutual labels:  emotion, css-in-js, tailwindcss
Styled Ppx
Typed styled components in Reason, OCaml and ReScript
Stars: ✭ 236 (+362.75%)
Mutual labels:  emotion, css-in-js
Grid
This package has moved and renamed
Stars: ✭ 2,079 (+3976.47%)
Mutual labels:  emotion, css-in-js
Emotion
👩‍🎤 CSS-in-JS library designed for high performance style composition
Stars: ✭ 14,177 (+27698.04%)
Mutual labels:  emotion, css-in-js
zaftig
~2kB css in js: z`display flex` // .zjsdkk43-1
Stars: ✭ 15 (-70.59%)
Mutual labels:  jsx, css-in-js
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (+409.8%)
Mutual labels:  jsx, css-in-js
visage
Visage design system
Stars: ✭ 12 (-76.47%)
Mutual labels:  emotion, css-in-js
spring-keyframes
✌️1.4kb library to generate css keyframes in css-in-js based on a spring algorithm, with emotion
Stars: ✭ 65 (+27.45%)
Mutual labels:  emotion, css-in-js
Cattous
CSS in JSX for lazy developers, built using styled-components and styled-system
Stars: ✭ 38 (-25.49%)
Mutual labels:  jsx, css-in-js
monad-ui
Utility First CSS-in-JS
Stars: ✭ 33 (-35.29%)
Mutual labels:  emotion, css-in-js
Vue Emotion
Seamlessly use emotion (CSS-in-JS) with Vue.js
Stars: ✭ 173 (+239.22%)
Mutual labels:  emotion, css-in-js
Filbert Js
A lightweight(~1kb) css-in-js framework
Stars: ✭ 167 (+227.45%)
Mutual labels:  emotion, css-in-js
Styled Components Vs Emotion
a short doc comparing the popular CSS-in-JS libraries styled-components and emotion
Stars: ✭ 204 (+300%)
Mutual labels:  emotion, css-in-js
Goober
🥜 goober, a less than 1KB 🎉 css-in-js alternative with a familiar API
Stars: ✭ 2,317 (+4443.14%)
Mutual labels:  emotion, css-in-js
Next Dark Mode
🌑 Enable dark mode for Next.js apps
Stars: ✭ 133 (+160.78%)
Mutual labels:  emotion, css-in-js
Styled-Responsive-Media-Queries
Responsive Media Queries for Emotion styled or styled-components — Standard size from Chrome DevTools.
Stars: ✭ 33 (-35.29%)
Mutual labels:  emotion, css-in-js
React Next Boilerplate
🚀 A basis for reducing the configuration of your projects with nextJS, best development practices and popular libraries in the developer community.
Stars: ✭ 129 (+152.94%)
Mutual labels:  emotion, css-in-js
Styled Jsx
Full CSS support for JSX without compromises
Stars: ✭ 6,768 (+13170.59%)
Mutual labels:  jsx, css-in-js

Benefit Logo


Style web applications using generated utility classes

benefit is a utility CSS-in-JS library that provides a set of low-level, configurable, ready-to-use styles.

Documentation

benefit is framework agnostic, use benefit-react for additional enhancements for React.


React-specific

Install dependencies

Add benefit-react to your project.

yarn add benefit-react

Setup transpilation

Set the jsx pragma at the top of your source file where you intend to use benefit-react.

Similar to a comment containing linter configuration, this configures the jsx babel plugin to use the jsx function instead of React.createElement.

JSX Pragma Documentation

Import the jsx function from benefit-react

/** @jsx jsx */
import { jsx } from "benefit-react"

Now, you're free to use any available utility classes to style your components

/** @jsx jsx */
import { jsx } from "benefit-react"

function MyComponent() {
  return (
    <div className="p-4 bg-orange-300 rounded">
      <p className="p-4 bg-white shadow rounded-sm">
        Williamsburg stumptown iPhone, gastropub vegan banh mi
        microdosingpost-ironic pok pok +1 bespoke dreamcatcher bushwick brunch.
      </p>
    </div>
  )
}

Framework agnostic

Add benefit to your project.

yarn add benefit

Import and use the createBenefit function to create your utility classes

import { createBenefit } from "benefit"

const { styleWith } = createBenefit()

Use styleWith(...) to pass in utility classes

<div class={styleWith("p-4 bg-white text-blue-700")}>
  ...
</div>
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].