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.
Successful builds, last 6 months
Start a raylang app with a ray-elements frontend.
Project
Help
How many users get the update first.
Who reviews this project's releases.
tests/*.test.js in a std/ui webview
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>
import { RayButton, RayInput, RaySwitch } from "@raylang/react";
export function SignIn() {
const [email, setEmail] = useState("");
return (
<form>
<RayInput name="email" label="Email" type="email" required
value={email} onInput={(e) => setEmail(e.currentTarget.value)} />
<RaySwitch name="remember" label="Remember me" checked />
<RayButton type="submit">Sign in</RayButton>
</form>
);
}
<script setup lang="ts">
import { ref } from "vue";
const email = ref("");
const remember = ref(true);
</script>
<template>
<form>
<RayInput v-model="email" name="email" label="Email" type="email" required />
<RaySwitch v-model="remember" name="remember" label="Remember me" />
<RayButton type="submit">Sign in</RayButton>
</form>
</template>
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.
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.
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.
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.