Menu
Libraries |
Category

pdfslick

  • PDFSlick is a library for viewing and interacting with PDF documents in React, SolidJS, Svelte, and JavaScript applications.
  • Built on Mozilla's PDF.js and uses Zustand for reactive state management.
  • Supports multiple frameworks, including Svelte, React, and SolidJS.

Key Features:

  • Provides reactive store integration for PDF document properties (scale, page number, total pages, etc.).
  • Offers framework-specific hooks and components (usePDFSlick() for React/SolidJS, direct store usage for Svelte).
  • Includes a PDF viewer component (PDFSlickViewer) and utilities for custom navigation controls.

Framework Support:

  • React: Uses @pdfslick/react with usePDFSlick() hook and PDFSlickViewer component.
    React Docs | Examples
  • SolidJS: Uses @pdfslick/solid with similar hooks and components.
    SolidJS Docs
  • Svelte: Uses @pdfslick/core for direct store integration and manual DOM binding.
    Svelte Docs

Core Concepts:

  • Wraps PDF.js functionality into a reactive store for modern web frameworks.
  • Enables custom UI components (toolbars, thumbnails) by exposing the store.

Motivation:

  • Simplifies PDF.js integration for component-based and reactive frameworks.

Learn More:

Author:

pdfpdfjspdf-viewerpdfslickreactsolidsolidjsreactjssolid-jssveltesveltejs

Comments