0.0.32 • Published 2 years ago

haki-ui v0.0.32

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Haki

A component library for reactjs. (still under development and doesn't contain some essential components yet)

Getting started

Step-1: install

cd your-react-project
npm i haki-ui

Step-2: wrap the root of your app with <HakiProvider></HakiProvider>. This will apply some global styles and ensure that all haki components have access to theme. Skipping this step will cause errors.

// index.js
import { HakiProvider } from "haki-ui";

ReactDOM.render(
  <React.StrictMode>
    <HakiProvider>
      <App />
    </HakiProvider>
  </React.StrictMode>,
  document.getElementById("root")
);

Step-3: start using any of the in-built components in your app.

import { Button } from "haki-ui";

function App() {
  return (
    <>
      <Button>click me 👀</Button>
    </>
  );
}

export default App;

Components

Storybook documentation for available components: https://haki.netlify.app

(please note all the icons used in examples are imported from a third party library (react-icons). if you want to use any icons, you'll also need to install "react-icons" or any other third party package of your choice. none of the icons can be imported directly from "haki-ui")

Customising theme colors

Any or all of the theme colors(primary, secondary, danger and warning) can be customised by passing theme prop to HakiProvider

// index.js
import { HakiProvider } from "haki-ui";

ReactDOM.render(
  <React.StrictMode>
    <HakiProvider
      theme={{
        primary: {
          light: "#ffcec5",
          main: "#f44336",
          dark: "#ba000d",
          contrastText: "#000",
        },
      }}
    >
      <App />
    </HakiProvider>
  </React.StrictMode>,
  document.getElementById("root")
);
0.0.32

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.19

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago