@pitchfork-ui/elements

Framework-agnostic custom elements for Pitchfork UI — the design system as standard web components, usable from React, Angular, Vue or plain HTML.
554 1
Install
npm install @pitchfork-ui/elements
Latest Version:0.2.1
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  npm
Maintainer: lelandrangel

@pitchfork-ui/elements

The Pitchfork UI design system as standard custom elements, authored with Stencil.

These are the same components as @pitchfork-ui/react, built to run anywhere — React, Angular, Vue, or a plain HTML page. Framework wrappers are generated from this package rather than hand-written.

Install

npm install @pitchfork-ui/elements @pitchfork-ui/tokens

Use

Load the design tokens once, then the element definitions:

<link rel="stylesheet" href="node_modules/@pitchfork-ui/tokens/dist/css/variables.css" />
<script
  type="module"
  src="node_modules/@pitchfork-ui/elements/dist/pitchfork/pitchfork.esm.js"
></script>

<pf-button variant="primary" size="md">Save</pf-button>

Or from a bundler:

import { defineCustomElements } from '@pitchfork-ui/elements/loader';

defineCustomElements();

Theming

Theming works exactly as it does in the React library: the --pf-* custom properties are declared once on :root and inherit through the shadow boundary. Component internals are encapsulated; the token layer is not.

:root {
  --pf-button-primary-bg: rebeccapurple;
}

Switch themes with [data-theme='dark'] on an ancestor, as before.

Styling internals

Shadow DOM means a consumer's stylesheet cannot reach inside a component. Each element exposes a documented ::part() surface instead:

pf-button::part(button) {
  border-radius: 0;
}

Content you slot into a component stays in the light DOM and is styled by your own CSS as normal.

Status

Early. Components land in waves — see WEB-COMPONENTS-PLAN.md in the repository. @pitchfork-ui/react remains the complete, hand-authored library and is not going away.

Licence

MIT

Related Packages

@pitchfork-ui/elements-vue

Vue bindings for @pitchfork-ui/elements — typed Vue components generated from th...

425 1
@parthi033/ui-foundation

A lightweight, framework-agnostic Web Components library built with Stencil

2,287 1
@ds-mo/ui

CompoMo — composable web components styled with TokoMo design tokens

43,041 1
@syidax/core

A consistent design system for React, Angular, Vue and the web. Themeable UI Web...

210
@syidax/core-pro

A consistent design system for React, Angular, Vue and the web. Core Pro adds tr...

204

Version History

Version Released License
0.2.1 MIT
0.1.0 MIT
Pre-releases (1)
Version Released License
0.0.0-stage