💠
Vaul logo

Vaul

component

Vaul is an unstyled drawer component specifically designed for React applications. It serves as a dialog replacement, optimized for use on tablet and mobile devices. The component is built with flexibility in mind, allowing developers to customize how the drawer behaves and appears in their applications.One of its key features is the capability to scale the background when the drawer is opened, creating a more immersive experience for users. The drawer can be controlled programmatically, enabling developers to manage its open state through React's state management. Vaul provides a straightforward API for integration, with clearly defined components such as Drawer.Root, Drawer.Trigger, Drawer.Content, and Drawer.Overlay, allowing for an organized structure when incorporating it into applications. The library supports various functionalities such as snapping points for better user interaction, customizability of the container for the drawer, and options for non-dismissible behavior.This component is ideal for developers looking to implement a responsive, mobile-friendly drawer feature without the constraints of styled components that could clash with their application's design system. For comprehensive examples on its usage, users can explore a set of interactive demos available on CodeSandbox, which showcase the component's various features like scroll controls and custom snap points.

Features

  • Unstyled drawer component
  • Mobile and tablet optimization
  • Background scaling
  • Customizable snap points
  • Programmatic control over open state
  • Supports nested drawers
  • Flexible content positioning
  • Custom portal for rendering

Stats

GitHub Stars6.4K

NPM Downloads515.9K/week

Details

Latest Version1.1.1

Created at7/16/2023

Updated at11/11/2024

LicenseMIT License

Related Items

Get a monthly E-Mail with the newest developments in UI!