v0.0.519 components on npm

Interfaces, carefully assembled.

The CodeChem design system as accessible, themeable web components. Use them in React, Vue, Angular or plain HTML with a single import.

Works wherever HTML works.

Standard custom elements built with Lit. No framework wrapper to install, no build plugin to configure.

  • One import. Load everything, or one component at a time to keep bundles small.
  • Encapsulated styles. Shadow DOM keeps your CSS and ours from colliding.
  • Native events. Listen for change and input like on any form control.
  • Editor support. Types and VS Code autocomplete ship with the package.
HTMLReactVueAngular
<!-- main.js: import '@codechem/components'; -->
<cc-text-input label="Work email"></cc-text-input>
<cc-switch checked>Email notifications</cc-switch>
<cc-button>Save changes</cc-button>

Your brand is one variable away.

Every colour, radius and surface comes from --cc-* custom properties. Override them on :root. No !important, no rebuild.

Accent
Open the theming lab
PublishPreview
DesignEngineeringLive
Notify teamPin

Tokens, without the components.

@codechem/tokens is the same Figma palette, type scale, spacing and radius as plain CSS custom properties. The components load it for you; install it on its own to style anything else.

  • One stylesheet. Import tokens.css and every --cc-* variable is on :root.
  • Semantic first. Surface, text, border and accent tokens switch with the theme. The raw palette is there when you need it.
  • Layered. The constructable sheet sits in @layer cc-tokens, so your overrides win.
Read the tokens docs
/* main.js: import '@codechem/tokens/tokens.css'; */
.card {
  background: var(--cc-surface-surface-1);
  color: var(--cc-text-high-emphasis);
  padding: var(--cc-padding-padding-3);
  border: 1px solid var(--cc-border-medium-contrast);
  border-radius: var(--cc-radius);
  font-family: var(--cc-typeface-typeface);
}

19 components, and counting.

See them all