Softwr

Documentation · head to head

Starlight vs Stencil

Starlight logo

Starlight

Documentation

Documentation site framework built on Astro that ships no JavaScript to the reader by default

From
Free
Free plan
Yes
Stencil logo

Stencil

Web Development

MIT licensed toolchain for building reusable Web Component libraries in TypeScript

From
Free
Free plan
Yes

The short version

  • Stencil is an open source toolchain.
  • Both are free.
  • Only Starlight lists file based routing; only Stencil lists shadow DOM and slots support.
  • Where Stencil falls short: aimed at component libraries, so routing and data fetching must come from elsewhere.

How do Starlight and Stencil differ?

Starlight and Stencil differ on pricing model, platforms and category (Documentation against Web Development). Only the attributes on which Starlight and Stencil actually diverge.

Attributes where Starlight and Stencil differ
AttributeStarlightStencil
Pricing modelOpen source, no licence feeOpen-source
PlatformsWeb, macOS, Windows, LinuxWeb, Windows, macOS, Linux
CategoryDocumentationWeb Development

Identical on both: starting price (Free), free tier (Yes).

Which features does each one have?

They share no listed features; 7 appear only for Starlight and 8 only for Stencil. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Starlight

  • File based routing
  • Pagefind search
  • Internationalisation
  • Component overrides
  • Zero client JavaScript
  • Expressive Code blocks
  • Auto generated sidebar

Only in Stencil

  • Compiles TypeScript and JSX to Web Components
  • Shadow DOM and slots support
  • Output optimised for tree shaking and loading
  • Asynchronous rendering pipeline
  • Documentation generated from JSDoc comments
  • Dev server with hot reloading
  • Unit testing and code generation tooling
  • Integration guides for Angular, React and Vue

What is each one used for?

Stencil is most often brought in for publishing a design system as Web Components. The jobs each tool is most often brought in to do.

Starlight

  • A developer tool whose docs live in the same repository as the code and are reviewed in the same pull requestnot Stencil
  • A team that already runs Astro for its marketing site and wants one build pipeline for bothnot Stencil
  • Documentation that must be served from a CDN or an air gapped static host with no search backendnot Stencil
  • A multilingual open source project that needs per locale content trees and untranslated page fallbacknot Stencil

Stencil

  • Publishing a design system as Web Componentsnot Starlight
  • Sharing UI components across React, Angular and Vue appsnot Starlight
  • Building framework independent widgetsnot Starlight
  • Generating documentation for component librariesnot Starlight
  • Building progressive web apps with Web Componentsnot Starlight

Where do Starlight and Stencil fall short?

Stencil's most cited limit: aimed at component libraries, so routing and data fetching must come from elsewhere. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Starlight

  • There is no editing interface, so every correction requires a git client, a Node install and a CI run, which puts documentation changes out of reach for anyone who does not already work in a repository
  • Starlight versions track Astro versions, so an Astro major release becomes a documentation site migration on someone else timeline rather than yours
  • Pagefind builds the whole search index at compile time, so build duration and index size grow with page count and large documentation sets pay for it on every deploy
  • There is no analytics, no feedback widget and no page level rating built in, so measuring which pages fail readers means wiring a third party script yourself
  • Component overrides are limited to the slots the theme exposes, and anything outside those slots means forking the theme and inheriting the merge burden on every upgrade

Stencil

  • Aimed at component libraries, so routing and data fetching must come from elsewhere
  • Requires TypeScript and decorator conventions that differ from other frameworks
  • Web Component styling and form handling can need extra work in some host frameworks
  • Smaller ecosystem of third party components than the largest frameworks

How much do Starlight and Stencil cost?

Starlight is free to use; Stencil is free to use. Plan by plan below, from each vendor's own pricing page.

Starlight

Free
  • Open sourceFree
    • MIT licence
    • All features included
    • Self hosted on any static host

Stencil

Free

No published plan breakdown. See the Stencil review.

Which should you pick?

Choose Starlight if

  • You need file based routing.
  • You want to start without paying.
  • You work on Web, macOS, Windows, Linux.
  • You also want pagefind search.

Choose Stencil if

  • You need compiles typescript and jsx to web components.
  • You want to start without paying.
  • You work on Web, Windows, macOS, Linux.
  • You also want shadow dom and slots support.

Questions people ask

Is Starlight or Stencil better?
It depends on the job. Starlight fits a developer tool whose docs live in the same repository as the code and are reviewed in the same pull request; Stencil fits publishing a design system as Web Components. Starlight starts at Free and Stencil at Free.
Which is cheaper, Starlight or Stencil?
Starlight starts at Free and Stencil at Free.
Does Starlight or Stencil run on more platforms?
Starlight runs on Web, macOS, Windows, Linux. Stencil runs on Web, Windows, macOS, Linux.
Can I use Starlight for free?
Both have a free tier, so you can try either at no cost before committing.
What is Starlight best used for?
Starlight is most often used for a developer tool whose docs live in the same repository as the code and are reviewed in the same pull request, a team that already runs astro for its marketing site and wants one build pipeline for both, documentation that must be served from a cdn or an air gapped static host with no search backend, a multilingual open source project that needs per locale content trees and untranslated page fallback. Of those, a developer tool whose docs live in the same repository as the code and are reviewed in the same pull request and a team that already runs astro for its marketing site and wants one build pipeline for both are not what Stencil is typically brought in for.
What can Starlight do that Stencil cannot?
Starlight covers File based routing, Pagefind search, Internationalisation, Component overrides. Stencil covers Compiles TypeScript and JSX to Web Components, Shadow DOM and slots support, Output optimised for tree shaking and loading, Asynchronous rendering pipeline.

Answered from the vendors’ own pages

Starlight: Can a non technical writer publish a page without help?

No. There is no content management interface. Every change is a commit, a pull request and a build.

Stencil: What does Stencil produce?

Stencil compiles components written in TypeScript and JSX into standard Web Components. These work in any major framework or without one.

Source
Starlight: Do I need to know Astro to use it?

Not for basic use. Markdown files and a config file are enough until you want custom components, at which point Astro knowledge becomes mandatory.

Stencil: Is Stencil free?

Yes. The project is released under the MIT licence according to both its website and its GitHub repository.

Source
Starlight: Is search included or do I pay for it?

Included and free. Pagefind builds a static index at compile time. Algolia DocSearch is optional if you want hosted search instead.

Stencil: Who builds Stencil?

The README says Stencil is built by the Ionic team. The website describes it as an open source project by Ionic.

Source
Starlight: What happens when Astro releases a major version?

Starlight follows it, and your site needs a migration. Read the upgrade guide before pinning a version for a long lived project.

Stencil: Does Stencil work with React, Angular and Vue?

Yes. Components are plain Web Components, and the website provides integration guides for Angular, React and Vue.

Source
Starlight: Can I self host with no external services?

Yes. The output is static HTML, CSS and a search index. Nothing calls out at runtime unless you add it.

Share

Related pages

Other head to heads