Reference
This section documents the @samline/drawer@4.0.1 public surface and its current runtime behavior. Start with configuration for accepted inputs, controller and registry for state ownership, or entrypoints for distribution choices.
Sections in this reference
Section titled “Sections in this reference”- Configuration — every
CommonDrawerOptionsandVanillaDrawerOptionsfield, including 4.0.1 defaults and deprecated aliases. - API — complete signatures and examples for every public function.
- Controller and registry — instance methods, id-based helpers, return values, headless state, and synchronization rules.
- Entrypoints and module formats — ESM, CommonJS, browser namespace, IIFE, and stylesheet exports.
- TypeScript — root type exports, structural shapes, constants, and the browser-only API type.
- Browser / CDN — browser namespace module plus separate CSS + JS CDN setup for
window.Drawer. - CSS styling — the full DOM/data-attribute contract, inline writes, and global effect ownership.
- Recipes — end-to-end patterns grouped by task.