svelte-pdf-mini follows bits-ui’s conventions — compound parts, child snippets, ref, data-* attributes, controlled and uncontrolled props — so both compose without adapters.
A bits trigger rendering one of our parts
bits passes its trigger props (ARIA attributes, handlers, the ref attachment); our part merges them with its own and chains the handlers.
Our part rendering your component
Controlled state
Viewer state is bindable, so bits primitives can drive it:
Use viewer.zoomTo() rather than assigning zoom when you want the eased transition.
Transitions
Both libraries use the same pattern: forceMount, the child snippet’s open flag, and a Svelte transition on your element. See Floating parts.
melt-ui table of contents
melt’s createTableOfContents (from @melt-ui/svelte) observes real headings. Add <Paper.Headings /> to each page — hidden h2–h6 at every section, with ids section-<id> — and point the builder at the pages container:
A recipe kit
The docs keep styled recipes inapps/docs/src/lib/demos/components/ui/: Button, Tip (tooltip with shortcut), ToggleGroup, Menu, ZoomSelect, ZoomSlider, Tabs, Dialog, Kbd and an accessible ColorPicker. Copy them into your app and restyle.