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

ex-excalidraw

v0.18.3

Published

Excalidraw as a React component

Readme

Excalidraw

Excalidraw is exported as a component to be directly embedded in your project.

Installation

Use npm or yarn to install the package.

npm install react react-dom ex-excalidraw
# or
yarn add react react-dom ex-excalidraw

Note: If you don't want to wait for the next stable release and try out the unreleased changes, use ex-excalidraw@next.

Self-hosting fonts

By default, Excalidraw will try to download all the used fonts from the CDN.

For self-hosting purposes, you'll have to copy the content of the folder node_modules/ex-excalidraw/dist/prod/fonts to the path where your assets should be served from (i.e. public/ directory in your project). In that case, you should also set window.EXCALIDRAW_ASSET_PATH to the very same path, i.e. / in case it's in the root:

<script>window.EXCALIDRAW_ASSET_PATH = "/";</script>

Dimensions of Excalidraw

Excalidraw takes 100% of width and height of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.

Demo

Go to CodeSandbox example.

Customization

The component now exposes additional props so host applications can fully control the surrounding UI and network integrations:

  • branding lets you disable the bundled Excalidraw branding or provide your own replacements for the welcome screen logo and the default main menu section.

  • remoteConfig centralises all remote endpoints (library browser URLs, publish backend, documentation links, and the font CDN fallback) so they can point to your self-hosted infrastructure.

  • renderTopToolbar, renderBottomToolbar, renderMainMenu, and renderMainMenuItems allow you to extend or replace the default toolbars and menu content on both desktop and mobile layouts.

  • toolbar toggles individual controls within the default toolbars (desktop and mobile) and lets you prepend or append custom UI without reimplementing the layout.

  • mainMenu controls the built-in menu entries so you can hide the stock actions or inject your own items around the defaults.

    <Excalidraw
      toolbar={{
        top: {
          items: { penModeButton: false },
          append: <MyCustomToolbarButton />,
        },
      }}
      mainMenu={{
        items: { loadScene: false, links: false },
        append: <MainMenu.Item onSelect={handleAbout}>About</MainMenu.Item>,
      }}
    />
  • onTelemetryEvent exposes the internal action logging so you can wire it to your own analytics pipeline while keeping telemetry disabled by default.

See the API docs for detailed typings and usage examples.

Integration

Head over to the docs.

API

Head over to the docs.

Contributing

Head over to the docs.