@tuv-indo/drawer
v0.0.1
Published
drawer component for Tuv UI
Downloads
360
Readme
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
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 Name | Value | required | | :-------- | :---------------------------------- | :------- | | children | ReactNode | true | | position | "top" / "right" / "bottom" / "left" | false | | isShow | boolean | true | | onHide | () => void | true | | noBg | boolean | false | | blur | boolean | false |