Web components for any app

79 accessible, themeable components built on web standards. Use them as plain HTML, from React or from Vue — in the browser, any webview or a raylang desktop app, where they come with extras.

Get started Browse components GitHub
v0.27.1 Shadow DOM + forms React & Vue wrappers Light & dark WCAG AA checked tokens No framework required
Deploy Preview
StableBeta
Actions Run ⌘RTestDelete branch
Build history

Successful builds, last 6 months

Next releasev0.5.0Scheduled
ChannelStableSigned updates
View full report
Create a project

Start a raylang app with a ray-elements frontend.

Create project Cancel
Download size
4.2 MB
Native build pending
VM bytecode1.1 MB
Runtime2.9 MB
Assets0.2 MB
Total4.2 MB

Project

68

Help

Rollout

How many users get the update first.

Team

Who reviews this project's releases.

Ada Lovelaceada@example.com
Owner
Grace Hoppergrace@example.com
Reviewer
Alan Kayalan@example.com
Reviewer
Run the app to stream its output here. Run app
Tests

tests/*.test.js in a std/ui webview

Passed68
Failed1
Duration41 s
drawer: the page stays hit-testable

Everything an app needs

From the form on the login screen to the command palette of a desktop tool — one set of components, one set of tokens, in any stack.

Web standards

Custom elements with Shadow DOM. Form fields are form-associated, overlays use the Popover API and the native dialog. No framework required.

React & Vue

Generated wrappers with typed props and events, v-model in Vue, and editor data for VS Code. The elements stay the single source of truth.

Tokens first

One tokens.toml becomes CSS variables and JSON. Contrast is checked against WCAG AA at build time; the chart palette is also checked for color blindness.

Theming

Light and dark with light-dark(), 13 palette colors as primary, any brand color with definePrimary, and per-component defaults with configure.

Own the code

Copy the components you need into your app with add, like shadcn/ui, or install the npm packages. Plain JavaScript, no build step.

Extensible

Build your own components on RayElement: properties, styles, icons and form behavior come with it, and wrap generates their types and wrappers.

Same element, any stack

Write HTML, or use the generated wrappers. Events, forms and refs behave the same.

<link rel="stylesheet" href="ray-elements/tokens.css">
<script type="module" src="ray-elements/index.js"></script>

<form>
  <ray-input name="email" label="Email" type="email" required></ray-input>
  <ray-switch name="remember" label="Remember me" checked></ray-switch>
  <ray-button type="submit">Sign in</ray-button>
</form>

Make it yours

Pick a primary color: every component on this page follows it, in light and dark.

For AI agents

Point your coding agent at the docs written for it, and let it check what it wrote.

llms.txt

The rules an agent gets wrong otherwise — slots, forms, events, tokens, React and Vue, the raylang bridge — and a link to each component's API as Markdown.

llms-full.txt

The whole reference in one file: every component, the tokens with their values, the icon names and the core's types.

In your app

Both ship in the package, for the version you installed: node_modules/@raylang/elements/llms.txt, in a raylang app too.

Works anywhere. Extras in raylang.

Nothing in a component requires raylang. In a raylang app, ray-elements loads from ray://app with no build step, and its tokens, docs, packages and browser tests are generated by raylang tools.

No build step

ES modules straight from ray://app in a std/ui window, form fields that hand a FormData to the program, and example apps checked in the real webview.

Native bridge

File dialogs with real paths, the app's menus in the command palette, native context menus and confirm dialogs, and the window chrome: title bar, colors that follow the theme, the unsaved-changes mark.

One package

The elements dependency brings the bridge and serves @raylang/elements to the pages by its npm name, from the app binary, with no npm install.

ray-elements in raylangRead the guide