Softwr

Documentation · head to head

Nextra vs Stencil

Nextra logo

Nextra

Documentation

Next.js based site generator for documentation and blog sites

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

  • Nextra is an MIT-licensed static site generator; Stencil is an open source toolchain.
  • Both are free.
  • Only Nextra lists pagefind full-text search; only Stencil lists shadow DOM and slots support.
  • Where Nextra falls short: requires working knowledge of Next.js and React.
  • Where Stencil falls short: aimed at component libraries, so routing and data fetching must come from elsewhere.

How do Nextra and Stencil differ?

Nextra and Stencil differ on platforms and category (Documentation against Web Development). Only the attributes on which Nextra and Stencil actually diverge.

Attributes where Nextra and Stencil differ
AttributeNextraStencil
PlatformsWebWeb, Windows, macOS, Linux
CategoryDocumentationWeb Development

Identical on both: starting price (Free), pricing model (Open-source), free tier (Yes).

Which features does each one have?

They share no listed features; 8 appear only for Nextra 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 Nextra

  • MDX content with components
  • Build-time syntax highlighting with Shiki
  • Pagefind full-text search
  • File-system routing
  • Internationalisation by locale folders
  • Docs and Blog themes
  • Dark mode and accessibility settings
  • Hybrid rendering with ISR

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?

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

Nextra

  • Developer documentation sitesnot Stencil
  • Project blogsnot Stencil
  • Multilingual docsnot Stencil
  • MDX based knowledge basesnot Stencil

Stencil

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

Where do Nextra and Stencil fall short?

Nextra's most cited limit: requires working knowledge of Next.js and React. Stencil's: 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.

Nextra

  • Requires working knowledge of Next.js and React
  • No visual editor or hosted publishing workflow is provided
  • Upgrading from version 3 to 4 needs a migration following the guide
  • Tied to the Next.js ecosystem, so it does not suit other frameworks

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 Nextra and Stencil cost?

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

Nextra

Free

No published plan breakdown. See the Nextra review.

Stencil

Free

No published plan breakdown. See the Stencil review.

Which should you pick?

Choose Nextra if

  • You need mdx content with components.
  • You want to start without paying.
  • You also want build-time syntax highlighting with shiki.

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 Nextra or Stencil better?
It depends on the job. Nextra fits developer documentation sites; Stencil fits publishing a design system as Web Components. Nextra starts at Free and Stencil at Free.
Which is cheaper, Nextra or Stencil?
Nextra starts at Free and Stencil at Free.
Does Nextra or Stencil run on more platforms?
Nextra runs on Web. Stencil runs on Web, Windows, macOS, Linux.
Can I use Nextra for free?
Both have a free tier, so you can try either at no cost before committing.
What is Nextra best used for?
Nextra is most often used for developer documentation sites, project blogs, multilingual docs, mdx based knowledge bases. Of those, developer documentation sites and project blogs are not what Stencil is typically brought in for.
What can Nextra do that Stencil cannot?
Nextra covers MDX content with components, Build-time syntax highlighting with Shiki, Pagefind full-text search, File-system routing. 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

Nextra: What licence does Nextra use?

It is released under the MIT licence.

Source
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
Nextra: How does search work?

Full-text search is indexed at build time using Pagefind, with no configuration needed.

Source
Stencil: Is Stencil free?

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

Source
Nextra: What themes are available?

Docs Theme, Blog Theme and Custom Theme.

Source
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
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
Share

Related pages

Other head to heads