Skip to content

Commit

Permalink
feat: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vladyoslav committed Feb 3, 2024
1 parent 02b7b77 commit 2583b1a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
41 changes: 41 additions & 0 deletions README.md
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).
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "drawer",
"name": "@vladyoslav/drawer",
"version": "0.1.0",
"description": "An unstyled draggable drawer component for React",
"private": false,
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 2583b1a

Please sign in to comment.