Skip to main content

Overview

Components

Every namespace, its parts, and how they nest.


Components are grouped in namespaces, imported from svelte-pdf-mini. Each page lists the namespace’s anatomy, a live demo, usage and an API reference generated from the library’s types.

Namespace Parts For
Document Root, Loading, Error, Password Loading a PDF and its states
Viewer Root, Viewport, Pages, Page, Canvas, TextLayer, LinkLayer, LinkPreview, Focus, BackButton Layout, rendering, links and navigation
Zoom In, Out, Mode, Select Zoom controls
PageNav Prev, Next, Input Page controls
Find Root, Input, Next, Prev, Toggle, Count, Result, Layer Search
Outline Root, Tree, Item PDF bookmarks
Thumbnails Root, Item Page previews
Minimap Root, Viewport, Markers A code-editor style overview
Annotations Root, Layer, SelectionMenu, Popover, HoverCard, Margin, LineMarkers, List, Crop, Comment, Tool, Color, Undo, Redo Highlights, boxes, drawings and notes
Paper Root, Layer, Headings, CitationCard, CrossRefPreview, References, Figures Research-paper aids
Toc Tree, Flat, Breadcrumb, Progress, Rail Tables of contents

Common props

Every part that renders an element also accepts:

Prop Type Meaning
ref HTMLElement null The rendered element (bindable)
child Snippet<[{ props, …snippetProps }]> Render your own element; spread props on it
children Snippet<[snippetProps]> Content, receiving the part’s snippet props
HTML attributes — class, style, aria-*, handlers… merged with the part’s own

These are not repeated in each API table.

Roots that create state (Find.Root, Annotations.Root, Paper.Root) render no element: wrap the pages and the parts that use them.