tldraw/tldraw
@tldraw/assets
Purpose
@tldraw/assets is the asset bundle: icons, fonts, translations, and embed icon sets. Module exports under packages/assets/src/ are generated from source assets in the repo-root assets/ directory by internal/scripts/refresh-assets.ts.
Layout
packages/assets/
├── package.json
└── src/ # generated; do not hand-edit
├── icons/
├── fonts/
├── embedIcons/
├── translations/
└── ...How it works
- Source files live in the repo's top-level
assets/directory (icons SVGs, font files, translation JSON). yarn refresh-assets(run automatically frompostinstalland fromyarn typecheck) regenerates the modules underpackages/assets/src/.- Other packages import the generated modules. The editor's
assetUrls.tsresolves URLs against a configurable base path so the bundled assets work offline and across deployment domains.
Integration points
- Imports. Generated.
- Importers.
@tldraw/editor,@tldraw/tldraw.
Modifying
- To add an icon: drop the SVG into the appropriate sub-folder of
assets/icons/, then runyarn refresh-assets. - To add a translation key: edit the source language JSON, push via
yarn i18n-upload-strings, and download translations withyarn i18n-download-strings.
Related
- Tooling for the asset pipeline.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.