https://github.com/monodyle/hiki
react dialog component that turn into drawer on small viewport
https://github.com/monodyle/hiki
dialog drawer modal react react-aria
Last synced: 4 months ago
JSON representation
react dialog component that turn into drawer on small viewport
- Host: GitHub
- URL: https://github.com/monodyle/hiki
- Owner: monodyle
- Created: 2023-07-31T16:59:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-30T13:56:50.000Z (over 2 years ago)
- Last Synced: 2023-08-30T21:35:06.907Z (over 2 years ago)
- Topics: dialog, drawer, modal, react, react-aria
- Language: TypeScript
- Homepage: https://hiki.minhle.space
- Size: 229 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
hiki - a dialog will turn into a drawer on small viewport
## Preview
Preview the example on https://hiki.minhle.space/
## Quick start
### Uncontrolled
```jsx
import { Dialog } from "@monodyle/hiki"; // not published yet...
function Application() {
return (
Open Dialog}>
{({ close }) => (
{/* your code goes here */}
)}
)
}
```
### Controlled
```jsx
import { Dialog } from "@monodyle/hiki"; // not published yet...
function Application() {
const [open, setOpen] = useState(false)
return (
setOpen(true)}>Open Dialog}>
{/* your code goes here */}
)
}
```
## Development
```
yarn # install dependencies
yarn dev # make it awesome
```
## Author
- [@monodyle](https://github.com/monodyle/) - [Twitter](https://twitter.com/monodyle)
### References
Inspired by [Devon Govett](https://twitter.com/devongovett)
## License
MIT © Monody Le 2023+