Installation
Add picola to your project — the dependency-free core, or the Svelte 5 adapter with built-in icons.
Install picola from npm:
npm i picolaThe Svelte adapter
The Svelte adapter (picola/svelte) uses @lucide/svelte
for its built-in icons as a peer dependency — npm 7+ installs it automatically,
and if your app already depends on lucide the single shared copy is reused, so
there are no duplicate icons in your bundle.
Import the component and the stylesheet:
<script lang="ts"> import { Lightbox } from 'picola/svelte'; import 'picola/picola.css';</script>Import picola/picola.css once, anywhere in your app — it is side-effect-only
and deduped by your bundler.
Requirements
- The core (
picola) is dependency-free and framework-agnostic. picola/svelterequires Svelte 5 and@lucide/sveltev1 as peers.- A modern evergreen browser — see Browser support.
What you get
| Entry point | Contents |
|---|---|
picola |
The framework-agnostic core: createViewer and low-level primitives. |
picola/svelte |
The Svelte 5 adapter: Lightbox, ToolbarButton, createGalleryOrigins. |
picola/picola.css |
The stylesheet (~1.3 KB min+gzip). |
Continue to the Quick start.