-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02b7b77
commit 2583b1a
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# @vladyoslav/drawer | ||
|
||
An unstyled draggable drawer component for React. | ||
|
||
Based on [@radix-ui/react-dialog](https://www.radix-ui.com/primitives/docs/components/dialog) and inspired by Emil Kowalski's awesome [Vaul](https://vaul.emilkowal.ski/). | ||
|
||
Demo: [vladyoslav-drawer.vercel.app](https://vladyoslav-drawer.vercel.app) | ||
|
||
## Documentation | ||
|
||
For full documentation, visit [vladyoslav-drawer.vercel.app/docs](https://vladyoslav-drawer.vercel.app/docs). | ||
|
||
### Installation | ||
|
||
Install the component from your command line. | ||
|
||
```shell | ||
npm i @vladyoslav/drawer | ||
``` | ||
|
||
### Usage | ||
|
||
Use the drawer in your app. | ||
|
||
```jsx | ||
import { Drawer } from '@vladyoslav/drawer' | ||
|
||
export const MyComponent = () => ( | ||
<Drawer.Root> | ||
<Drawer.Trigger>Open Drawer</Drawer.Trigger> | ||
<Drawer.Portal> | ||
<Drawer.Overlay /> | ||
<Drawer.Content>...</Drawer.Content> | ||
</Drawer.Portal> | ||
</Drawer.Root> | ||
) | ||
``` | ||
|
||
### API Reference | ||
|
||
To see components props, visit the full [documentation](https://vladyoslav-drawer.vercel.app/docs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters