Skip to content
PluginStats

sveld weekly downloads statistics

By carbon-design-system · npm · Vite plugins

Generate TypeScript definitions and component documentation for your Svelte components.

View on npm Fresh · Oct 17, 2026

sveld has 4,956 recorded weekly downloads on npm, an increase of 19.4% over the past 30 days.

It ranks #1099 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by +15.1%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
4,956
Official API · Oct 17, 2026
7-day growth
+1.0%
+48 weekly downloads
30-day growth
+19.4%
+804 weekly downloads
90-day growth
+15.1%
+649 weekly downloads
Rank
#1099
Among tracked npm listings

About sveld

sveld

[![NPM][npm]][npm-url]

sveld generates TypeScript definitions and component documentation (JSON and Markdown) for Svelte component libraries. It statically analyzes props, events, slots, snippets, context, module exports, and rest props, and reads JSDoc where inference isn't enough.

The generated .d.ts files give consumers autocomplete and type checking through the Svelte Language Server and TypeScript, with little effort from the library author. Carbon Components Svelte uses sveld to generate its component types and API metadata.

sveld supports Svelte 3, Svelte 4, Svelte 5 without runes (export let, , $$restProps), and Svelte 5 runes ($props(), $bindable(), {@render}, callback props).

When to use sveld

If your library is built with SvelteKit's svelte-package, it already emits .d.ts files through svelte2tsx; start there.

sveld is for:

• JavaScript-first libraries. Components written in plain JavaScript with JSDoc, where you want full editor types without converting to lang="ts". • Docs from the same source as the types. JSON and Markdown API docs, generated in the same run. • API drift checks. --check diffs the component API against a committed snapshot and fails CI on breaking changes. • Richer types from JSDoc. @typedef, @callback, @slot, @event, and context types that plain inference can't produce.

lang="ts" components work too: sveld keeps their type annotations as written.

Install

Quick start

sveld reads the "svelte" field of your package.json as the entry point: the file that re-exports your components.

CLI

Run npx sveld --help for every flag. Options can also live in a sveld.config.js:

Vite plugin

The plugin runs during vite build (and during vite dev with watch: true). It also works in Rollup configs.

Node

document is the same component API document json: true writes, so you can render your own formats from it. See Options for everything sveld() accepts and returns.

Example

Given this component:

sveld infers prop types and defaults, the forwarded click event, the default slot, and the rest props spread onto :

The default slot is also typed as a children snippet prop for Svelte 5 consumers, and the data-* index signature lets callers pass data attributes through $$restProps.

Add JSDoc to tighten types and add descriptions:

The runes version (let { type = "button", primary = false, children, ...rest } = $props(), spreading rest and rendering children) produces the same $Props. It has no click event, since runes components take onclick as a prop through rest.

The .d.ts extends SvelteComponentTyped by default, which works for consumers on Svelte 3, 4, and 5. Set typesOptions.format: "component" (--types-format=component) to emit the Svelte 5 Component type instead. See Output.

JSON and Markdown

npx sveld --markdown documents the same component in COMPONENT_INDEX.md:

npx sveld --json writes the same data to COMPONENT_API.json, validated by a JSON Schema that ships with the package. An excerpt of the prop entry:

See Output for the full shape.

In CI

Commit COMPONENT_API.json, then gate pull requests on API changes and inference gaps:

See CI for exit codes, the change classification table, diagnostic codes, and how to ignore a diagnostic.

JSDoc tags

| Tag | Use it to | Example | | :- | :- | :- | | @type | Type a prop | @type {"sm" \| "md" \| "lg"} | | @default | Override the inferred default shown in docs | @default () => true | | @typedef | Declare a shared, exported type | @typedef {{ id: string }} Item | | @property | Document a field of a @typedef {object} or event detail | @property {string} [label] - Label text | | @callback | Declare a function type | @callback OnChange + @param/@returns | | @slot / @snippet | Type slot or snippet props | @slot {{ item: Item }} row | | @event | Type a dispatched event's detail | @event {{ id: string }} save | | @param / @returns | Type an exported function | @param {string} id | | @restProps | Name the element rest props are spread onto | @restProps {button \| a} | | @extendProps | Extend another component's props | @extendProps {"./Button.svelte"} ButtonProps | | @template / @generics | Declare generics in a JS component | @template {Item} [T=Item] | | @bindable | Document a prop's bind: contract | @bindable writable | | @deprecated | Mark a prop, event, slot, or export deprecated | @deprecated Use "size" instead. | | @ignore / @internal | Hide from every output | @internal | | @since / @see / @example | Pass structured tags through to all outputs | @since 1.2.0 | | {@link} | Link in a description | {@link https://example.com\|docs} | | @csspart / @cssprop | Document shadow-DOM styling hooks | @cssprop {Color} [--bg=white] | | @sveld-ignore | Suppress a diagnostic | @sveld-ignore sveld/prop-unknown-type | | | Document the component itself | |

Context types come from setContext calls with no tag needed. See Context.

Docs

• Options: every option and CLI flag, the config file, the Vite plugin, sveld() and its result, and sveld/browser. • JSDoc tags: how types are inferred and every tag sveld reads. • Output: .d.ts formats, JSON output and schema, Markdown, entry exports, custom element metadata, and custom output formats. • CI: exit codes, --check for API drift, --strict and diagnostic codes, and @example checking. • Troubleshooting

Try sveld in the browser at sveld.onrender.com (source in playground/).

Requirements

• Node 22 or later, or Bun. sveld is ESM-only. • A sveld.config.ts needs a runtime that strips TypeScript: Bun, or Node 22.18+ / 23.6+. • The optional checkExamples check for TS/JS examples needs typescript 7+ and a tsconfig.json. Nothing else loads TypeScript. • Your installed Svelte version doesn't affect parsing. sveld parses with sveast, kept in parity with svelte/compiler.

Contributing

See the contributing guidelines.

License

Apache-2.0

Description from the npm listing.

  • svelte
  • svelte component
  • documentation
  • docgen
  • typescript
  • definitions
  • JSDocs
  • vite
  • vite-plugin

Where sveld sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,256 listings · 113 pages · page 55, #19 (overall #1099)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 11, #1 (overall #201)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

sveld weekly downloads on npm, last 90 days: 4,956 weekly downloads as of Oct 17, 2026, +15.1% over 90 days.sveldWeekly downloads on npm · Last 90 days4,956downloads / week+15.1% over 90 days02K4K6K8K10KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
sveld weekly downloads on npm, last 90 days: 4,956 weekly downloads as of Oct 17, 2026, +15.1% over 90 days.
PNG SVG

7/30/90-day growth

sveld weekly downloads growth on npm: +1.0% over 7 days, +19.4% over 30 days, +15.1% over 90 days.sveldWeekly downloads growth on npm4,956downloads / week now7-day growth+48 weekly downloads+1.0%30-day growth+804 weekly downloads+19.4%90-day growth+649 weekly downloads+15.1%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
sveld weekly downloads growth on npm: +1.0% over 7 days, +19.4% over 30 days, +15.1% over 90 days.
PNG SVG

Ranking history

sveld npm ranking history: currently #1099 (by weekly downloads).sveldnpm ranking · by weekly downloads · Last 90 days#1099current rank#1095#1096#1097#1098#1099#1100#1101Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
sveld npm ranking history: currently #1099 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (121)
Recent weekly downloads observations for sveld
Date (UTC)Weekly downloadsChange vs. previous
4,956-598
5,554+404
5,150-978
6,128-1K
7,1670
7,167+955
6,212+1.3K
4,908+105
4,803+425
4,378-164
4,542+257
4,285-732
5,017+34
4,983—

Similar npm Vite plugins plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/sveld. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.