Values
The numbers your app feeds a visual — progress, audio level, quality — as direct props.
A value is app data that a pattern draws: how far an upload is, how loud the user speaks, how good the connection is. Values are plain props on the component, and they can change every frame.
import { SinuaView } from "@sinua/web/react";
// One value: how much of the ring is filled (0 to 1).
export function Upload({ fraction }: { fraction: number }) {
return <SinuaView pattern="completing" overrides={{ progress: fraction }} style={{ width: 64, height: 64 }} />;
}
// One value per ring: `progress0` is the outermost. `ringCount` sets how many are drawn.
export function ActivityRings({ move, exercise, stand }: { move: number; exercise: number; stand: number }) {
return (
<SinuaView
pattern="tracking"
overrides={{ ringCount: 3, progress0: move, progress1: exercise, progress2: stand }}
style={{ width: 96, height: 96 }}
/>
);
}
Every value
Which patterns read which value, with its range. Everything outside the range is clamped by the engine.
| Component | Prop | Patterns | Type | Range | Description |
|---|---|---|---|---|---|
SinuaOrb | progress | progressing | number | 0–1 fraction | How far the eclipse has advanced, 0 to 1. |
SinuaRing | progress | completing | number | 0–1 fraction | How much of the ring is filled, 0 to 1. |
SinuaRing | progress | tracking | number[] (1–4, length = ringCount) | 0–3 | Per-ring value; past 1 draws extra laps (up to maxLaps). Also accepted: progress0, progress1, progress2, progress3. |
SinuaRing | progress | stepping | number | 0–1 fraction | How many segments are filled, as a fraction 0 to 1. |
SinuaRing | segment | stepping | number[] (1–24, length = segmentCount) | 0–1 fraction | Per-segment fill (0 to 1) when segments fill independently; overrides progress for the segments given. |
SinuaRing | progress | measuring | number | 0–1 fraction | The gauge value, 0 to 1. |
SinuaBeacon | once | notifying | boolean | Play one ripple and stop (restart the clock to replay). | |
SinuaBeacon | quality | reconnecting | number | 0–1 fraction | Connection quality 0 to 1: lit segments and a calmer pulse as it rises. |
SinuaBeacon | accuracy | locating | number | 0–1 fraction | Location accuracy 0 to 1: the halo shrinks as it rises. |
SinuaBeacon | level | broadcasting | number | -1–1 (UI -0.05–1) fraction | Signal level 0 to 1 (how many waves are lit); below 0 = animate on its own. |
| every object | audioLevel | every pattern | number | 0–1 | The live voice level 0 to 1; drives the radial breathing pulse on any pattern. |
| every object | muted | every pattern | number | 0–1 | The mute / connection-lost cue, 0 to 1. |
Lists of values
Some patterns take one value per item. tracking draws up to four activity rings, so progress is a list with one entry per ring (the length follows ringCount). A ring's value past 1 draws extra laps, up to 3.
{
"fxSpec": "1.8",
"object": "ring",
"pattern": "tracking",
"params": {
"ringCount": 3,
"progress": [
0.8,
0.45,
1.2
]
}
}
In a binding, address one ring with progress[0], progress[1], … (see Bindings).
Values vs style
Every prop in the catalog is either a value (app data, above) or style (how it looks: shape, colour, materials, speed). Values change with your data. Style is a design decision you usually set once, or per state.
Catching mistakes
The engine clamps every value to its range. Typed components (Swift, Kotlin, React Native) catch unknown names and wrong types at compile time. A view doesn't validate plain-pattern props at runtime: warnings (unknown names, out-of-range numbers, fractions for whole-number props) come from resolving an FX Spec, or from checking a set of props yourself. The visual still renders either way:
import { checkOverrides } from "@sinua/core";
// Warnings only: the frame still renders, and the engine clamps out-of-range values.
const warnings = checkOverrides("breathing", 64, { lanse: 6 });
for (const w of warnings) {
console.warn(`${w.path}: ${w.message}`);
// → /lanse: unknown key `lanse` for orb/breathing (did you mean `lanes`?)
}
The full list of messages is in Diagnostics.