Prepare a capture plan
Optics bench / Draft sequence
Edits supplied capture steps, exact exposure, time, depth and channel values, and distinguishes requested actions from recorded run state.
Optics bench / Draft sequence
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { AcquisitionSequencer } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/acquisition-sequencer.
npx @noorddev/vlak-cli add acquisition-sequencer
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/acquisition-sequencer.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { useState } from "react";
import { AcquisitionSequencer } from "@noorddev/vlak-react";
import type { AcquisitionStep } from "@noorddev/vlak-react";
function CapturePlan() {
const [steps, setSteps] = useState<readonly AcquisitionStep[]>([
{ id: "first", label: "First plane", exposure: 10, exposureUnit: "ms", time: 0, timeUnit: "s", depth: -1, depthUnit: "µm", channel: "phase", status: "Not run" },
{ id: "second", label: "Second plane", exposure: 10, exposureUnit: "ms", time: 5, timeUnit: "s", depth: 0, depthUnit: "µm", channel: "phase", status: "Not run" },
]);
return <AcquisitionSequencer label="Capture plan" channels={[{ id: "phase", label: "Phase" }]} steps={steps} onStepsChange={setSteps} />;
}A controlled capture plan editor and recorded-state display, without an acquisition engine.
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | ReactNode | ||
stepsrequired | readonly AcquisitionStep[] | ||
channelsrequired | readonly AcquisitionChannel[] | ||
onStepsChange | (steps: readonly AcquisitionStep[]) => void | ||
onAction | (stepId: string, actionId: string) => void | ||
description | ReactNode | ||
readOnly | boolean | false |
Also accepts FieldsetHTMLAttributes<HTMLFieldSetElement>.
| Keys | Does |
|---|---|
| Tab | Moves through enabled numeric inputs, channel selectors and step actions. |
| Arrow keys, Home, End, typing | Edits native numeric fields or navigates the opened channel list. |
| Enter, Space | Confirms the active channel option or requests the focused action or reorder. |
| Escape | Closes the channel list without changing the supplied selection. |
<fieldset class="rs-acquisition-sequencer"><legend class="rs-acquisition-sequencer-legend">Capture plan</legend><ol class="rs-acquisition-sequencer-list"><li class="rs-acquisition-sequencer-step"><div class="rs-acquisition-sequencer-head"><span class="rs-acquisition-sequencer-title">First plane</span><span class="rs-acquisition-sequencer-copy">Not run</span></div><p class="rs-acquisition-sequencer-value">Exposure 10 ms · Time offset 0 s · Depth -1 µm · Phase</p></li></ol></fieldset>