Skip to Content

Examples

Explore various integration examples showcasing Motion Drawer’s flexibility and compatibility with different UI libraries. These examples demonstrate key features like customizable snap points, offset, padding, border radius, and more.

You must install Motion library v12.23.24 or newer into your project as Motion Drawer uses Motion under the hood.

Integrate with Headless UI

Default

The most basic setup for a drawer without any customization.

With Space

Customize it with padding, offset, and fixed border radius.

With Snap Points

You can define snap points as an array that the drawer will snap to.

Integrate with React Aria

This example shows how to integrate Motion Drawer with the React Aria Dialog  component.

Integrate with Radix UI

This example shows how to integrate Motion Drawer with the Radix UI Dialog  component.

Scrolling Examples

Vertical Scroll

Handle long content that exceeds the drawer height automatically.

Horizontal Scroll

Integrate horizontal carousels or scrollable lists within the drawer.

Nested Scroll

Seamlessly handle scrollable elements inside an already scrollable drawer.

Padding & Offset Scroll

Test how scrolling behaves when the drawer has additional padding and offset.

Last updated on