Giter VIP home page Giter VIP logo

bs-chakra-ui's Introduction

bs-chakra-ui ๐Ÿšง

Bucklescript bindings for chakra-ui.

Important note, chakra-ui use the styled system but in order to avoid props bindings overhead, I decided to mainly use <Box /> when I need to create space, etc.

Install

yarn add @dck/bs-chakra-ui

Add it to bs-dependencies in your bsconfig.json :

{
  "bs-dependencies": ["@dck/bs-chakra-ui"]
}

Example

open BsChakra;

module App = {
  [@react.component]
  let make = () => {
    let (isChecked, setChecked) = React.useState(() => false);

    <ThemeProvider theme>
      <CSSReset />
      <Text fontSize={Responsive([|`center, `right, `left|])}>
        "Hello responsive"->React.string
      </Text>
      <Stack isInline=true align=`center spacing=2>
        <FormLabel htmlFor="toggle">
          <Text fontSize={All(`center)}>
            "Toggle"->React.string
          </Text>
        </FormLabel>
        <Switch
          id="toggle"
          size=`lg
          isChecked
          onChange={_ => setChecked(v => !v)}
        />
      </Stack>
    </ThemeProvider>
  };
};

Todo

  • Accordion
  • Alert
  • AspectRatioBox
  • Avatar
  • Badge
  • Box ๐Ÿšง
  • Breadcrumb
  • Button ๐Ÿšง
  • Checkbox
  • CircularProgress
  • CloseButton
  • Code
  • Collapse
  • ControlBox
  • Drawer
  • Editable
  • Flex
  • FormControl
  • FormHelperText
  • FormErrorMessage
  • Heading
  • Icon
  • IconButton
  • Image
  • Input
  • Link
  • List
  • Modal
  • Menu
  • NumberInput
  • Popover
  • Progress
  • PseudoBox
  • Radio
  • Slider
  • Spinner
  • Stat
  • Stack
  • Switch
  • Tabs
  • Tag
  • Textarea
  • Text
  • Toast
  • Tooltip
  • useClipboard
  • useDisclosure
  • useTheme

bs-chakra-ui's People

Contributors

dckt avatar simondegraeve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bs-chakra-ui's Issues

Add playground

It would be nice if we can add a simple playground into the project as example code. Btw it is easier to the contributor to visualize the update. I can open a PR.

Add more bindings components

My project will use this library binding, but it doesn't have enough components I need.

  • Radio
  • Toast
  • Tooltip

I can open a PR for it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.