npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

svelte-excalidraw

v0.0.8

Published

Thin Svelte wrapper for Excalidraw

Downloads

100

Readme

svelte-excalidraw lib

banner

Thin Svelte wrapper around Excalidraw, the virtual whiteboard for sketching hand-drawn like diagrams.

Try it in SvelteLab

Installation

npm i svelte-excalidraw

Usage

<script>
  import Excalidraw from "svelte-excalidraw";
</script>

<Excalidraw />

This will render an embedded Excalidraw canvas with default behavior.

Props

https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/

All props are optional.

| Name | Type | Default | Description | | --- | --- | --- | --- | | initialData | object | null | Promise<object | null> | null | The initial data with which app loads. | | excalidrawAPI | function | _ | Callback triggered with the excalidraw api once rendered | | isCollaborating | boolean | _ | This indicates if the app is in collaboration mode | | onChange | function | _ | This callback is triggered whenever the component updates due to any change. This callback will receive the excalidraw elements and the current app state. | | onPointerUpdate | function | _ | Callback triggered when mouse pointer is updated. | | onPointerDown | function | _ | This prop if passed gets triggered on pointer down events | | onScrollChange | function | _ | This prop if passed gets triggered when scrolling the canvas. | | onPaste | function | _ | Callback to be triggered if passed when something is pasted into the scene | | onLibraryChange | function | _ | The callback if supplied is triggered when the library is updated and receives the library items. | | generateLinkForSelection | function | _ | Allows you to override url generation when linking to Excalidraw elements. | | onLinkOpen | function | _ | The callback if supplied is triggered when any link is opened. | | langCode | string | en | Language code string to be used in Excalidraw | | renderTopRightUI | function | _ | Render function that renders custom UI in top right corner | | renderCustomStats | function | _ | Render function that can be used to render custom stats on the stats dialog. | | viewModeEnabled | boolean | _ | This indicates if the app is in view mode. | | zenModeEnabled | boolean | _ | This indicates if the zen mode is enabled | | gridModeEnabled | boolean | _ | This indicates if the grid mode is enabled | | libraryReturnUrl | string | _ | What URL should libraries.excalidraw.com be installed to | | theme | "light" | "dark" | "light" | The theme of the Excalidraw component | | name | string | | Name of the drawing | | UIOptions | object | DEFAULT UI OPTIONS | To customise UI options. Currently we support customising canvas actions | | detectScroll | boolean | true | Indicates whether to update the offsets when nearest ancestor is scrolled. | | handleKeyboardGlobally | boolean | false | Indicates whether to bind the keyboard events to document. | | autoFocus | boolean | false | Indicates whether to focus the Excalidraw component on page load | | generateIdForFile | function | _ | Allows you to override id generation for files added on canvas | | validateEmbeddable | string[] | boolean | RegExp | RegExp[] | ((link: string) => boolean | undefined) | _ | use for custom src url validation | | renderEmbeddable | function | _ | Render function that can override the built-in <iframe> | | [renderScrollbars] | boolean| | false | Indicates whether scrollbars will be shown

Development

npm install
npm run dev

To build and package:

npm run build
npm run package
npm pack

Credits