Back to directory
stenciljs avatar

core

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, (+ more) and traditional web applications from a single, framework-agnostic codebase.. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/stenciljs/core.git

13,123

Stars

852

Forks

164

Watchers

NOASSERTION

License

stencil-logo

Stencil

A compiler for generating Web Components using technologies like TypeScript and JSX, built by the Ionic team.

StencilJS is released under the MIT license. StencilJS is released under the MIT license. PRs welcome! Follow @stenciljs Official Ionic Discord

Quick Start · Documentation · Contribute · Blog
Community: Discord · Forums · Twitter

Getting Started

Start a new project by following our quick Getting Started guide. We would love to hear from you! If you have any feedback or run into issues using Stencil, please file an issue on this repository.

Examples

A Stencil component looks a lot like a class-based React component, with the addition of TypeScript decorators:

import { Component, Prop, h } from '@stencil/core';

@Component({
  tag: 'my-component',            // the name of the component's custom HTML tag
  styleUrl: 'my-component.css',   // css styles to apply to the component
  shadow: true,                   // this component uses the ShadowDOM
})
export class MyComponent {
  // The component accepts two arguments:
  @Prop() first: string;
  @Prop() last: string;

   //The following HTML is rendered when our component is used
  render() {
    return (
      <div>
        Hello, my name is {this.first} {this.last}
      </div>
    );
  }
}

The component above can be used like any other HTML element:

<my-component first="Stencil" last="JS"></my-component>

Since Stencil generates web components, they work in any major framework or with no framework at all. In many cases, Stencil can be used as a drop in replacement for traditional frontend framework, though using it as such is certainly not required.

Contributing

Thanks for your interest in contributing! Please take a moment to read up on our guidelines for contributing. We've created comprehensive technical documentation for contributors that explains Stencil's internal architecture, including the compiler, runtime, build system, and other core components in the /docs directory. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Releases

Aug 21, 2026

🐠 4.44.1 (2026-08-21)

Download .zip

What's Changed

fix(compiler): track type query references by @Boulea7 in #6825 ci: add compile and runtime benchmark jobs by @johnjenkins in #6821 feat(types): added focusgroupstart property by @mfra...

Aug 11, 2026

🐓 4.44.0 (2026-08-10)

Download .zip

What's Changed

feat(config): allow suppressing reserved event name warnings by @deleonio in #6748 chore(deps-dev): bump form-data from 3.0.4 to 3.0.5 in /src/testing/jest/jest-27-and-under by @depend...

May 28, 2026

🍐 4.43.5 (2026-05-28)

Download .zip

Bug Fixes

compiler: resolve @prop variable defaults to literal values in docs output (#6728) (6cdcec7) compiler: silence INVALID_ANNOTATION and SOURCEMAP_BROKEN warnings from workerPlugin (#6718) (ef...

Apr 13, 2026

🏝 4.43.4 (2026-04-13)

Download .zip

Bug Fixes

cache host refs in public render() method (#6674) (7dd8ea7) compiler: set log file path when writeLog is enabled (#6655) (3d95083), closes #6632 runtime: normalize legacy watcher metadata f...

Apr 13, 2026

🐕 4.43.3 (2026-03-19)

Download .zip

feat(testing): deprecate all integrated testing options by @johnjenkins in #6642 fix(mock-doc): updated node.prepend to work even if there are no existing children by @kyleMessnerLillyContractor in #...