npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@viamrobotics/prime-controls

v0.5.0

Published

Compact realtime controls for Svelte 5 tool panels: number fields and vectors that scrub by pointer and step by keyboard.

Readme

@viamrobotics/prime-controls

Compact realtime controls for Svelte 5 tool panels: number fields, vectors, and sliders that step by keyboard and scrub by dragging, text and file fields, plus panels, folders, and tabs to group them.

[!NOTE] Under active development. The public API is unstable until 1.0.

Installation

pnpm add @viamrobotics/prime-controls @viamrobotics/prime-ui @viamrobotics/tailwind-config

Requires svelte ^5.29.0. Import the stylesheets once, after Tailwind:

@import 'tailwindcss';
@import '@viamrobotics/prime-ui/styles.css';
@import '@viamrobotics/prime-controls/styles.css';

Usage

NumberField

<script lang="ts">
	import { NumberField } from '@viamrobotics/prime-controls';

	let speed = $state(5);
</script>

<NumberField label="Speed" min={0} max={10} step={0.1} bind:value={speed} />

Drag the label sideways to scrub, or press ArrowUp and ArrowDown to step. Shift steps by 10 times and Alt by a tenth. A function binding receives every value a scrub writes and can veto or throttle by not assigning.

Pass hint to put an info button beside the label that shows the text in a tooltip and describes the field to a screen reader. NumberField, Point, Slider, and ToggleButtons take it with a visible label. A childless Select has none, so it names the button from aria-label.

<NumberField label="Speed" hint="Metres per second" bind:value={speed} />

Pass suffix to draw a short text such as a unit inside the input's right edge. It is part of the field's accessible description. Point draws it in every axis and Slider in its readout.

<NumberField label="Length" suffix="mm" bind:value={length} />

Pass state ('warn' or 'error') to draw a warning-dark or danger-dark border. An error also sets aria-invalid="true". 'info' draws no border. NumberField and Point take it, and Point gives one state to every axis.

<NumberField label="Speed" state="warn" bind:value={speed} />

TextField

<script lang="ts">
	import { TextField } from '@viamrobotics/prime-controls';

	let name = $state('');
</script>

<TextField label="Motion name" placeholder="builtin" bind:value={name} />

A text input in the NumberField row layout, without scrub. The bound value is a string, and an empty field is ''. It takes hint and state as NumberField does.

FileField

<script lang="ts">
	import { FileField } from '@viamrobotics/prime-controls';

	let files = $state<File[]>([]);
</script>

<FileField label="Audio file" accept=".wav,.mp3" bind:value={files} />

A native file input in the TextField row layout. The bound value is a File[], which holds at most one file without multiple, and a cleared field is []. The chosen names truncate to the row and a clear button sits beside them. It takes hint and state as NumberField does.

Point

<script lang="ts">
	import { Point, type PointValue } from '@viamrobotics/prime-controls';

	let position = $state<PointValue>({ x: 0, y: 1, z: 2 });
</script>

<Point label="Position" step={0.1} bind:value={position} />

The defined axes decide how many fields render: x and y, plus z and w when present.

Slider

<script lang="ts">
	import { Slider } from '@viamrobotics/prime-controls';

	let opacity = $state(0.5);
</script>

<Slider label="Opacity" min={0} max={1} step={0.01} bind:value={opacity} />

A native range with a number readout beside it. A drag writes the value on every pointer move.

Panel

<Panel title="Camera">
	<NumberField label="FOV" bind:value={fov} />
</Panel>

A dense group of controls. A visible title names it, or pass aria-label.

Folder

<Folder title="Lighting" bind:open>
	<Slider label="Intensity" min={0} max={1} step={0.01} bind:value={intensity} />
</Folder>

A collapsible group inside a panel, open by default.

Tabs

<Tabs bind:value>
	<Tabs.List aria-label="Mode">
		<Tabs.Trigger value="move">Move</Tabs.Trigger>
		<Tabs.Trigger value="rotate">Rotate</Tabs.Trigger>
	</Tabs.List>
	<Tabs.Content value="move">…</Tabs.Content>
	<Tabs.Content value="rotate">…</Tabs.Content>
</Tabs>

The prime-ui tabs at panel scale, with the same parts and keyboard.

Documentation

See the package docs for recipes, keyboard and pointer behavior, and props.

Development

This package lives inside the viamrobotics/prime monorepo. See the package CLAUDE.md for stack, layout, and commands.

License

Apache-2.0