lw is a set of animated UI components built with SCSS and vanilla JavaScript Web Components. Rather than shipping a framework, it gives you standard custom elements that work everywhere, with zero runtime dependencies and nothing to configure.
It serves as the common UI layer for LowerSoft's web products and is under active development.
Everything below works the same in plain HTML, React, Vue, Svelte or anything else. No framework needed.
There are no peer dependencies and no build plugins to configure.
npm install @lowersoft/lwOr load it from a CDN:
<!-- In <head> -->
<link rel="stylesheet" href="https://unpkg.com/@lowersoft/lw/dist/themes.css">
<!-- In <body> -->
<script type="module">
import 'https://unpkg.com/@lowersoft/lw/dist/index.js';
</script>Or, for a single component:
<script type="module">
import 'https://cdn.jsdelivr.net/npm/@lowersoft/lw/dist/components/button.js';
</script>Important
The <script> tag must use type="module"; import statements only work in module scripts. The CDN paths above point to the built dist/ output. If the published package layout changes, check the file paths on unpkg or jsDelivr. Loading the full bundle registers every component. Importing a single entry point registers only that component.
Import only what you need, every component is a separate entry point:
import '@lowersoft/lw/components/button';Or register everything at once:
import '@lowersoft/lw';Then use it like any other HTML element:
<lw-button variant="outline" size="lg">Get started</lw-button>Components render with the default theme right after the import. There is nothing to wrap, provide or initialize.
This example uses no package manager, no bundler, and no framework. It loads one component from unpkg, applies the default theme, overrides a few design tokens, and styles a component internal with ::part().
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lw CDN Example</title>
<!-- Optional: static theme tokens before JavaScript loads -->
<link rel="stylesheet" href="https://unpkg.com/@lowersoft/lw/dist/themes.css">
<!-- Register only the button component -->
<script type="module">
import 'https://unpkg.com/@lowersoft/lw/dist/components/button.js';
</script>
<style>
/* Override design tokens. Defaults have zero specificity. */
:root {
--lw-color-primary: #6d28d9;
--lw-radius-md: 9999px;
}
/* Style component internals through ::part() */
lw-button::part(button) {
letter-spacing: 0.02em;
}
</style>
</head>
<body>
<h1>lw components via CDN</h1>
<!-- Use components like normal HTML elements -->
<lw-button variant="outline" size="lg">Get started</lw-button>
<lw-button>Default button</lw-button>
</body>
</html>No initialization, wrapper, provider, or configuration is required. Once the module is imported, every matching custom element on the page is registered and rendered with the default theme.
The default theme is installed automatically on first use. It follows prefers-color-scheme; force a scheme with data-theme on <html>:
<html data-theme="dark">Every design token is a --lw-* CSS custom property. Override any of them, default values have zero specificity, so plain declarations win:
:root {
--lw-color-primary: #6d28d9;
--lw-radius-md: 9999px;
}Style component internals with ::part():
lw-button::part(button) {
letter-spacing: 0.02em;
}Need the tokens in your own CSS before JavaScript loads? Link the static theme:
import '@lowersoft/lw/themes.css';SCSS users can reuse the token functions and mixins:
@use '@lowersoft/lw/scss' as lw;
.card {
border-radius: lw.v(radius-lg);
}| Command | What it does |
|---|---|
npm install |
Install the development dependencies |
npm run storybook |
Component docs and playground; each story's Usage tab has its markup and API |
npm run build |
Library build into dist/ |
npm run lint |
Check the JavaScript with ESLint |
npm run build-storybook |
Static Storybook build into storybook-static/ |
npm test |
Open every story of that build in Chromium and fail on errors and leaks |
npm run new <name> <Category> |
Scaffold a new component in a Storybook category |
Something broke? Delete node_modules/ and dist/, run npm install again and retry. Still stuck? Open an issue.
The idea is simple: use the platform and put a thin, boring layer on top of it. Components are plain custom elements, styling is plain CSS custom properties, and the small shared runtime only handles what you would otherwise repeat in every component (theme installation, registration, animation helpers).
flowchart TB
A["Your page<br/><sub><lw-button> in HTML, React, Vue, Svelte…</sub>"] --> B["lw components<br/><sub>custom elements · shadow DOM · ::part()</sub>"]
B --> C["Shared runtime<br/><sub>~2 kB gzip · registration · theme install</sub>"]
B --> D["Design tokens<br/><sub>--lw-* CSS custom properties</sub>"]
D --> E["Light · Dark · Your overrides"]
Your code only ever talks to the HTML element and its attributes. Nothing else leaks upward.
components/
├── src/
│ ├── components/ One folder per component, each its own entry point
│ ├── core/ The shared runtime: base class, registration, helpers
│ ├── styles/ Tokens, functions, mixins and the default theme
│ └── index.js The full bundle
├── scripts/ Component scaffolding (npm run new) and the story smoke test
├── .storybook/ Component docs and playground, with the Usage tab
├── .changeset/ Pending release notes
├── CONTRIBUTING.md
└── ROADMAP.md
lw has zero runtime dependencies. No third-party code is bundled, nothing is patched, and every component is a separate entry point, so you only pay for what you import. The shared runtime is about 2 kB (gzip). The one outside contribution is icon artwork from Lucide, see Third-party software.
Importing a component registers its custom element. From there the browser owns the lifecycle:
import '@lowersoft/lw/components/button'
├─ shared runtime loads (once, shared by every component)
├─ default theme is installed on first use
├─ customElements.define('lw-button', …)
└─ every <lw-button> on the page
├─ connectedCallback ← render + attach animations
├─ attributeChangedCallback (variant, size, …)
└─ disconnectedCallback ← cleanup
Because they are standard custom elements, they work in any framework that can render HTML.
Design tokens are installed as CSS custom properties, and components read them at render time:
default theme ──install──▶ :root { --lw-* } ──read──▶ components
▲ ▲
│ └── your overrides win (default values have zero specificity)
└── prefers-color-scheme / data-theme picks light or dark
- Defaults are declared with zero specificity, so any plain declaration in your CSS overrides them.
data-themeon<html>forces a scheme, otherwiseprefers-color-schemedecides.- Component internals are exposed through
::part(), so you can restyle them without touching the source. themes.cssis the same set of tokens as a static file, for use before JavaScript loads.
| Piece | What it does |
|---|---|
| SCSS | Source of all component styles and the exported token functions and mixins. |
npm run build |
Builds the library into dist/, one entry point per component plus the full bundle. |
| Storybook | Component docs and playground, started with npm run storybook. |
| ESLint | npm run lint catches undefined names, unused code and other mistakes. |
| Smoke test | npm test opens every story of the static Storybook, takes its elements out of the page and puts them back, and fails on errors or animations that keep running. CI runs it on every push. |
npm run new |
Scaffolds a component (and its story) so every component starts with the same structure. |
Want a new component? Run npm run new <name> <Category>, fill in the generated files and it becomes its own entry point, the same way every existing component is done: no extra libraries, one import from your app. See CONTRIBUTING.md and ROADMAP.md.
Not sure where to start? Pick the row that matches your situation, so your message reaches the right people on the first try.
| I want to... | Reach us via |
|---|---|
| Ask about licensing or copyright | info@lowersoft.com |
| Follow up on a repo issue that hasn't had a reply | support@lowersoft.com |
| Report a problem with the UI of a LowerSoft product I own | Open a ticket on lowersoft.com |
| Learn what lw brings to our products | Live chat on lowersoft.com, no sign-in needed |
- Licensing & copyright (
info@): using lw in your own project, redistribution, attribution or anything legal-sounding. If in doubt, ask before you ship. - Unanswered issues (
support@): please open a GitHub issue first. It keeps the answer public and useful for everyone. If it has been quiet for a while, send us a short mail with the issue link and we'll pick it up. - Product tickets: if a LowerSoft product you bought has a UI problem (layout, theme, crashes in the interface), a ticket is the fastest route because it is tied to your account and product version. Include a screenshot and your browser.
- Live chat: it connects you straight to our customer relations team, no account required.
Heads up: this is a component library repo, not a product helpdesk. Product questions go to a ticket, library bugs go to GitHub issues. Everything else is welcome in the table above.
Built and maintained by LowerSoft. Every part of this project is shaped by our own time and effort, and we're not planning to slow down. 💙
Everyone who has helped along the way shows up here automatically:
Want to see your face here? Head over to Contribute.
Our goal is to make building animated, accessible web UI easier, tidier and more reliable for everyone. Any contribution that moves the project in that direction is welcome, from a one-character typo fix to a new component. Pull requests and forks are always appreciated.
| I want to... | Do this |
|---|---|
| Report a bug | Open an issue with the steps to reproduce, the expected result and the actual result |
| Suggest an idea | Open an issue; rough ideas are fine |
| Fix or add something | Fork the repo and send a pull request |
| Improve the documentation | Send a pull request; wording, missing steps and typos are all welcome |
| Test on my browser | Run Storybook and report the result, especially on less common browsers |
- Fork the repository and create a branch from
main(for examplefix/button-focusorfeat/tooltip). - Build it with
npm run buildand make sure it compiles without warnings, and runnpm run lint. - Test it by opening the component in Storybook (
npm run storybook), then runnpm run build-storybookandnpm test. The first test run needs Playwright's Chromium:npx playwright install chromium --only-shell. - Open the pull request and describe what changed and why. Screenshots or recordings help for UI and animation changes.
For larger changes, please open an issue first so we can agree on the direction before you invest the time.
- Vanilla JavaScript and SCSS, no runtime dependencies.
- Code, comments and documentation are written in English.
- Every design token is a
--lw-*CSS custom property, and defaults keep zero specificity. - Components expose their internals through
::part(). - Commit messages start with a short summary line, followed by a brief explanation when the reasoning is not obvious.
Questions about contributing? See Contact and CONTRIBUTING.md.
lw is released under the MIT License. You are free to use, copy, modify, merge, publish, distribute, sublicense and sell copies of the software, including in commercial projects, as long as the copyright notice and the license text are included in all copies or substantial portions of it.
The software is provided "as is", without warranty of any kind.
lw has no runtime dependencies. Its icons come from Lucide (ISC), some of them derived from Feather (MIT); their notices are in THIRD-PARTY-NOTICES.md, which ships with the package.
Questions about licensing or copyright? See Contact.
