Tiny/Drawer

Help

FAQ

Quick answers to the most common tiny-drawer and tiny-drawer-react questions.

Which package should I install?01

Use tiny-drawer for vanilla JavaScript or TypeScript projects. Use tiny-drawer-react when you want a React or Next.js wrapper with props, refs, hooks, and bundled dependency on tiny-drawer.

Do I need to install both tiny-drawer and tiny-drawer-react?02

No. tiny-drawer-react already depends on tiny-drawer, so app developers can usually install only tiny-drawer-react for React projects.

Is the package safe to import during SSR?03

Yes. Both packages are safe to import in SSR because they defer DOM access until the browser is available. The actual drawer instance should still be created from client-side effects.

How do I style the drawer?04

For the core package, import tiny-drawer/dist/tiny-drawer.css or tiny-drawer/dist/tiny-drawer.min.css. For React, import tiny-drawer-react/styles.css once in your app.

Can I mount a drawer inside a specific container?05

Yes. Pass the host element as the constructor container and use parentContainer when you want the drawer host mounted inside a specific parent instead of the default body-mounted behavior.

Page 1 of 2