LitSX is a Lit-first compiler and tooling workspace for authoring web components with modern JSX, static hoists, and an optional React-compat migration layer.
This repository contains the runtime, Babel presets, authoring support, editor tooling, and scaffolding packages that make up the LitSX toolchain.
The documentation site lives at litsx.dev and is maintained from the separate litsxdev/litsx.dev repository.
The VS Code extension lives in the separate litsxdev/vscode-litsx repository.
LitSX source is not just generic TSX with helper imports. The authored model includes:
- Lit-flavoured JSX bindings such as
@event,.prop, and?attr - static hoists such as
static styles = ...,static properties = ...,static shadowRootOptions = ..., and other directstatic name = ...declarations static expose = ...for static class methods
Generic static name = ... hoists lower to memoized static getters on the generated class. static expose = ... is the exception: it lowers to real static methods.
Because plain tsc does not parse this authored syntax directly, editor support comes from @litsx/typescript and CLI type-checking comes from litsx-tsc.
packages/core: main runtime package, JSX runtime entrypoints, async boundaries, elements, and rendering helperspackages/compiler: public programmatic compilation facadepackages/create-litsx-app: project scaffolderpackages/eslint-plugin-litsx: official ESLint integration for LitSX-authored sourcepackages/prettier-plugin-litsx: official Prettier integration for.litsxand.litsx.jsxpackages/typescript: TypeScript language-service support andlitsx-tscfor LitSX-authored JSXpackages/authoring: shared authored JSX language model and parser helperspackages/babel-parser-litsx: Babel parser adapter for LitSX-authored JSXpackages/scoped-registry-shim: internal shimmed scoped-registry runtime used by shadow hosts and renderer mountspackages/vite-plugin: Vite integration
packages/babel-preset-litsx: native LitSX lowering pipelinepackages/babel-preset-react-compat: React compatibility lowering pipelinepackages/babel-plugin-transform-litsx-scoped-elements: scoped elements transform that remains public as a standalone pluginpackages/babel-plugin-transform-jsx-html-template: JSX to Lithtmltemplate loweringpackages/babel-plugin-litsx-proptypes: Reactprop-typescompat lowering to native property hoists
packages/babel-plugin-shared-hooks: shared transform helpers consumed by the public Babel packagespackages/typescript-session: shared TypeScript session plumbing used by editor and type-check tooling
Install dependencies:
yarn installRun the test suite:
yarn testBuild the workspace:
yarn buildThe workspace focuses on:
- native LitSX JSX ergonomics
- React compatibility as a separate transform layer
- authored syntax support for Lit-flavoured JSX and static hoists
- editor support through
@litsx/typescript - CLI type-checking through
litsx-tsc - scaffolding and editor tooling
Each package directory contains its own README.md with package-specific details.