Skip to content

(WIP) Fluent styling API for React Components

Notifications You must be signed in to change notification settings

ostwilkens/flus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flus

Fluent styling API for React Components

npm

npm install flus
import { el } from 'flus'

const HStack = el("div").display("flex").flexDirection("row")

const Button = 
  el("button")
    .padding("2px 4px")
    .borderRadius("6px")
    .fontWeight("bold")

const PrimaryButton = 
  Button
    .color("white")
    .background("blue")

const SecondaryButton = 
  Button
    .color("black")
    .background("white")
    .border("1px solid blue")

// fancy call syntax
const ComponentB = () => 
  HStack.background("salmon")(
    PrimaryButton("Foo"), 
    SecondaryButton("Bar")
  )

// classic jsx
const ComponentA = () => 
  <HStack style={{ background: "salmon" }}>
    <PrimaryButton>Foo</PrimaryButton>
    <SecondaryButton>Foo</SecondaryButton>
  </HStack>

todo

  • proof of concept
  • publish npm package
  • code example
  • features
  • performance

About

(WIP) Fluent styling API for React Components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published