Reusable UI components, brand styling, and translation strings for Open Elements projects.
This package contains extracted UI components from the Open CRM frontend, designed to be shared across Open Elements projects. It ships raw .tsx source files — the consuming app compiles them as part of its own build.
- Button — Primary action button with variant and size support
- Input — Text input field
- Textarea — Multi-line text area
- InputGroup — Composite input with addons and buttons
- Combobox — Searchable dropdown with chip support (based on Base UI)
- TagMultiSelect — Multi-select tag picker with colored chips
- MarkdownEditor — WYSIWYG Markdown editor that round-trips all supported Markdown constructs without data loss; toolbar actions are configurable per usage via the
toolbarprop - MarkdownView — Read-only Markdown renderer with structural output (headings, lists, task lists, blockquotes, code); task-list checkboxes become interactive via an optional
onChange(optimistic update with rollback)
import { Button, Input, Combobox, TagMultiSelect, cn } from "@open-elements/ui";
import type { TagDto } from "@open-elements/ui";Import brand CSS in your app's stylesheet:
@import "@open-elements/ui/src/styles/brand.css";Because this package ships raw .tsx, its utility classes reach your app as source text. Tailwind
only turns them into CSS if it scans the library, so the consuming app must point at it and load the
typography plugin that MarkdownView relies on:
@import "tailwindcss";
@import "@open-elements/ui/src/styles/brand.css";
@plugin "@tailwindcss/typography";
@import "tw-animate-css";
@source "../node_modules/@open-elements/ui/src";Each line is load-bearing:
@source— this package ships raw.tsx, so its utility classes reach your app as source text. Without the scan they never become CSS, and components render unstyled: task list checkboxes pick up aprosebullet, for instance.@tailwindcss/typography—MarkdownViewandMarkdownEditorhardcodeprose prose-sm.tw-animate-css— every overlay (Dialog,AlertDialog,Sheet,Popover,Select,Combobox,Tooltip) writes its enter and exit states withanimate-in,fade-in-0,zoom-in-95andslide-in-from-*, none of which are Tailwind core utilities.
The component showcase uses exactly this configuration and asserts the result, so a break in this contract surfaces there.
import { de, en } from "@open-elements/ui";Every component can be opened in isolation, with its props adjustable at runtime, in a Storybook catalogue:
pnpm storybook # dev server on http://localhost:6006
pnpm build-storybook # static build into storybook-static/Stories live in stories/, deliberately outside src/: files in package.json
publishes all of src/, so a colocated story would ship in the tarball and break a consumer's tsc
on unresolvable @storybook/* imports. Nothing under src/ imports Storybook, and Tailwind is a
devDependency that no build script consumes — the published package is unaffected.
Stories carry play functions, which run in a real browser and cover what jsdom can only check
indirectly: the toolbar allowlist, the task-list creation gate under actual keystrokes, the
checkbox lifecycle after actual clicks, and that the Tailwind utilities the components rely on
resolve to real styles. They are additive; the vitest suites are unchanged.
Every exported component has stories, grouped in the sidebar as Primitives, Forms, Overlays, Data, Actions, Navigation and Markdown.
Rendering the library for real turned up defects the unit tests cannot see — an undefined
--radius, a non-existent text-oe-gray, unlabelled icon buttons and a set of brand tokens that
miss WCAG AA. They are catalogued in docs/showcase-findings.md; none
have been changed in src/.
Deployment of the showcase is documented in docs/showcase-deployment.md.
Every release publishes two CycloneDX 1.7 SBOMs as assets on its
GitHub Release, so a specific
published version can be obtained without an npm install:
| Asset | Contents | Authoritative? |
|---|---|---|
sbom.cdx.json |
Runtime dependencies (transitive) plus the library's peer dependencies | Yes — use this for supplier assessments (Cyber Resilience Act) |
sbom-dev.cdx.json |
The build toolchain (devDependencies) |
No — provided for transparency only |
Both are generated locally with the pinned pnpm (pnpm sbom) and verified in CI on every pull
request, so a dependency change that breaks the SBOM turns the build red. A release cannot ship without
a valid SBOM.
pnpm sbom # writes sbom/sbom.cdx.json and sbom/sbom-dev.cdx.json (gitignored)
pnpm sbom:verify # validates both against the CycloneDX 1.7 schema and package.jsonPeer dependencies. radix-ui, @base-ui/react, lucide-react, react and react-dom are peer
dependencies: the consumer supplies them. pnpm sbom alone omits them, so they are added to
sbom.cdx.json and marked with a cdx:npm:peer property holding the declared range. The version
recorded for each peer is the one resolved in this repository's lockfile, not the one a consumer
installs — it changes when we bump our own devDependencies, even though nothing changes for the
consumer. Read a peer's cdx:npm:peer range, not its pinned version, as the requirement.
Pushing a v<version> tag triggers .github/workflows/release.yml.
It runs the CI checks, generates the SBOMs, stages the npm publish and creates a draft GitHub
Release. Nothing goes live until a maintainer approves both by hand (2FA).
package.json always holds the last released version.
-
Check the upgrade guide. Every user-visible change since the last release must be covered by
docs/upgrade-to-<major.minor>.mdfor the version you are about to release — reviewgit log v<last-version>..HEADagainst it. Commit the guide before bumping. -
Bump the version on an up-to-date, clean
main. This commits the new version and creates the matching tag in one step; only plainA.B.Cversions are accepted:pnpm version minor --message "chore: release %s" -
Push — the tag starts the release:
git push --follow-tags origin main
-
Approve the npm publish once the workflow is green, on npmjs.com or with
pnpm stage listandpnpm stage approve <stage-id>. -
Publish the draft GitHub Release after reviewing its generated notes.
-
Workflow failed, nothing staged: delete the tag, commit the fix, and tag again by hand —
package.jsonalready holds the release version, so do not runpnpm versionagain:git tag -d v<version> && git push origin :refs/tags/v<version> # commit the fix, then: git tag -a v<version> -m "<version>" && git push origin v<version>
-
Workflow failed after staging: discard the stage on npmjs.com, then re-cut the tag as above.
-
Wrong content already approved on npm: published versions are immutable — release a patch version instead.