Scan your whole stack
From OX Research Newsroom
Are you using @clarity-js/ui?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.3.0
@clarity-js/ui was last scanned on 30 Nov 2026 at version 1.3.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.3.0 LATEST | 30 Nov 2026 | No rules fired |
| 0.0.0-stage | 30 Nov 2026 | Not shown |
Findings for v1.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.3.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Components for Clarity.js: the twelve things nearly every app needs, built on the browser's own elements, usable with the keyboard and a screen reader, themed with CSS custom properties. No dependencies besides Clarity itself.
Button · Input · Textarea · Select · Checkbox · Switch · Dialog · Tabs · Tooltip · Menu · Toast · Table
Every one is shown live, with its code, at https://clarity-js.com/docs/ui.
npm install @clarity-js/ui
It needs @ozsarman/clarityjs 1.3 or later (the components use rest parameters, which arrived
in 1.3).
// main.js: the styles, once
import '@clarity-js/ui/styles.css'
import { Button, Input, Dialog, Toaster, toast } from '@clarity-js/ui'
component Invite() {
state mail = ""
state asking = false
action send() {
asking = false
toast.success("The invitation is on its way.", { title: "Sent" })
}
render {
<main>
<Button variant="accent" on:click={ asking = true }>Invite someone</Button>
<Dialog bind:open={ asking } title="Invite a member" description="They get an e-mail with a link.">
<Input label="E-mail" type="email" bind:value={ mail } placeholder="ada@example.com" required />
<div slot="footer">
<Button variant="outline" on:click={ asking = false }>Cancel</Button>
<Button on:click={ send() }>Send</Button>
</div>
</Dialog>
<Toaster />
</main>
}
}
The package is plain ES modules that import @ozsarman/clarityjs/runtime, so it works with Vite,
webpack, Rollup, or no bundler at all (an import map). The .clarity sources are in src/, to
read or to copy and change.
What you write on a component that is not one of its own props lands on the element it is made
of. A <Button> is a <button>, an <Input> is an <input> with a label around it, a
<Dialog> is a <dialog>. So id, class, disabled, type, name, placeholder, aria-…,
data-…, on:click and ref all work the way they do on that element, and there is no list of
"supported attributes" to learn.
<Button type="submit" class="wide" disabled={ !valid } aria-describedby="terms" on:click={ send() }>Send</Button>
<Input label="Search" type="search" name="q" autocomplete="off" on:keydown.enter={ search() } ref={ box } />
Your class and style are added to the component's own. Two-way values use bind: as on an
element: bind:value (Input, Textarea, Select, Tabs), bind:checked (Checkbox, Switch),
bind:open (Dialog).
| Component | Props of its own | Notes |
|---|---|---|
Button |
variant (primary, accent, outline, ghost, danger), size (sm, md, lg), loading, block |
While loading it shows a spinner and holds presses back without losing the focus. |
Input |
value, label, hint, error, id |
Label, hint and error are tied to the field; an error marks it invalid and is read out. |
Textarea |
the same, and grow |
grow follows what is typed where the browser can. |
Select |
the same, and options, placeholder |
The browser's own <select>. Options are values or { value, label, disabled }; a number stays a number. |
Checkbox |
checked, indeterminate |
The label is what is between the tags. |
Switch |
checked |
A checkbox with role="switch". |
Dialog |
open, title, description, size, dismissable, closeLabel |
The browser's own modal <dialog>: focus stays inside, Escape closes, focus returns. slot="footer" for its buttons. |
Tabs |
value, tabs ({ value, label, disabled }), label |
Each panel is slot="<the tab's value>". Arrows, Home, End. on:change. |
Tooltip |
text, side |
Wrap the one thing it describes. Pointer and keyboard; Escape hides it. |
Menu, MenuItem, MenuSeparator |
label, icon, variant, size, align; items: danger, disabled |
Arrows, Home, End, a letter to jump, Escape. on:click on an item is what it does. |
Toaster, toast() |
position, label, closeLabel |
toast("Saved"), toast.success/error/warning(text, { title, duration, action }), dismiss(id). |
Table |
rows, columns, caption, empty, sort, rowKey, dense, striped |
Sortable headers with aria-sort; format and compare per column; a cell template for cells of your own. on:sort. |
Types for all of them are in index.d.ts.
Everything visual is a custom property on :root. Set them once and every component follows:
:root {
--cui-sun: #7c5cff; /* the chosen thing: a tab, a ticked box, a switch that is on */
--cui-on-sun: #ffffff;
--cui-solid: #1d1b3a; /* the primary button, toasts, tooltips */
--cui-radius: 8px;
--cui-font: "Inter", system-ui, sans-serif;
}
data-theme="dark" on any element turns what is inside it dark. The full list (about thirty
properties) is at the top of styles.css. Selectors are a single class wherever possible, so a
rule of your own, written after the import, wins without !important.
prefers-reduced-motion and forced colours are respected; text and
the edges of controls meet WCAG AA in both themes.useId(), so the server's
HTML and the hydrating client agree.Each release is tried in a real browser by node scripts/check-ui.mjs (in the repository): it
uses every component with the pointer and with the keyboard alone and checks what the page then
is.
MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.