0.0.1 • Published 8 months ago

@tuv-indo/drawer v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Hudoro drawer

Hudoro drawer is a strict and customizable drawer component for web development projects, designed for simplicity and adherence to strict design guidelines.

Screenshots

App Screenshot

Package instalation

Instal package using pnpm

  pnpm add @hudoro/drawer

Instal package using yarn

  yarn add @hudoro/drawer

Instal package using npm

  npm i @hudoro/drawer

Usage/Examples (you can combine using icon package hudoro)

import React, {useState} from "react";
import {Drawer} from "@hudoro/drawer";
import ReactDOM from "react-dom/client";

const App = () => {
  const [isshow, setIsshow] = useState(false);
  const toggleShow = () => setIsshow((prev) => !prev);
  return (
    <div style={{height: "100vh", background: "black"}}>
      <button onClick={toggleShow}>Component test</button>
      <Drawer isShow={isshow} position="right" onHide={toggleShow} blur={false}>
        <div style={{minWidth: "30vw"}}>children</div>
      </Drawer>
    </div>
  );
};

ReactDOM.createRoot(document.getElementById("app")!).render(<App />);

Props @hudoro/drawer

Props that you can pass to <Drawer {...props} >

Prop NameValuerequired
childrenReactNodetrue
position"top" / "right" / "bottom" / "left"false
isShowbooleantrue
onHide() => voidtrue
noBgbooleanfalse
blurbooleanfalse
0.0.1

8 months ago