Docs / Viewers / Document Viewer Sidebar
Document Viewer Sidebar
Shared responsive thumbnail sidebar for document viewers: inline beside the page when the viewer is at least 768px wide, an overlay on narrower viewers.
Page 1: Invoice summary
Differences from upstream
useElementWidth()returns{ ref, width }, whererefis a Svelte attachment ({@attach shell.ref}) andwidthis reactive, instead of a React[ref, width]tuple.classis accepted alongsideclassName; both are merged.childrenis a Svelte snippet instead of ReactNode.- The undocumented Tailwind class props
widthClassNameandclosedInlineClassNameare not ported; the sidebar is fixed at upstream's default 10rem. - Each component takes
isDarkfrom the parent instead of inheriting a.darkancestor class;onIsDarkChangeis accepted and never called. - The demo's sidebar icon is an inline SVG instead of Hugeicons.
- Port-only export:
INLINE_THUMBNAIL_SIDEBAR_MIN_WIDTH, the shell width at which the sidebar switches from overlay to inline (upstream keeps it private).