Sinua
Connect your app

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.

upload-progress
react.tsx
import { SinuaView } from "@sinua/web/react";

// One value: how much is done (0 to 1); the done part of the dune glows.
export function Upload({ fraction }: { fraction: number }) {
  return <SinuaView pattern="dune" overrides={{ progress: fraction }} style={{ width: 160, height: 64 }} />;
}

Every value

Which patterns read which value, with its range. Everything outside the range is clamped by the engine.

ComponentPropPatternsTypeRangeDescription
SinuaOrbprogressprogressingnumber0–1 fractionHow far the eclipse has advanced, 0 to 1.
SinuaSignallevelveilnumber0–1 fractionHow high the sheet swells, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither the sheet breathes on its own.
SinuaSignallevelcrystalnumber0–1 fractionOne value for the whole crystal, 0 to 1 (a battery, a quota, a goal). Left out, a bound voice's bands fill the columns; with neither it idles low.
SinuaSignalprogressdunenumber0–1 fractionHow much is done, 0 to 1: a clip's position or a long task's progress. The done part glows. Left out, the plane drifts across on its own.
SinuaSignalenvelopedunenumber[] (1–64)0–1 fractionThe dune's profile, 0 to 1 per value (a clip's loudness or any series; up to 64). Without it a fixed dune is drawn.
SinuaSignallevelcometnumber0–1 fractionHow brightly and how long the stream burns, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither it glows low and keeps circling.
SinuaSignallevelflownumber0–1 fractionHow strongly the fronts light the sheet, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither it glows low and keeps sweeping.
SinuaSignallevelcohesionnumber0–1 fractionHow brightly the sphere burns, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither it glows low.
SinuaSignalqualitycohesionnumber0–1 fractionHow whole the sphere is, 0 to 1: as it falls the points let go one by one and warm to amber; 1 (the default) is whole.
SinuaSignalblipsscaninteger0–12How many points the scan has found, 0 to 12: each flashes white as the beam reaches it and burns down.
SinuaSignallevelscannumber0–1 fractionHow brightly the beam burns, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither it glows low.
SinuaSignallevelconstellationnumber0–1 fractionHow brightly the clouds burn, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither they burn at a quiet default.
SinuaSignalprogressconstellationnumber0–1 fractionHow far through all the steps, 0 to 1: each step takes an equal share. Left out, the first step is done and the next one gathers and loosens on its own.
SinuaSignallevelripplenumber0–1 fractionHow brightly the shells burn, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither they burn at a quiet default.
SinuaSignallevelbroadcastnumber0–1 fractionHow strongly the fronts burn and how often they leave, 0 to 1: any value (a bound input) or, when left out, a bound voice's level; with neither a slow swell stands in.
every objectaudioLevelevery patternnumber0–1The live voice level 0 to 1; drives the radial breathing pulse on any pattern.
every objectmutedevery patternnumber0–1The mute / connection-lost cue, 0 to 1.

The keys of one pattern

Some values belong to one pattern: quality to cohesion, blips to scan, and steps (a whole number from 2 to 8) and progress to constellation. dune also takes a list, envelope, up to 64 values from 0 to 1: the profile of the dune, such as a clip's loudness. Signal has one example of each.

A constellation with fixed steps and progress, no binding:

fixed-progress.fxspec.json
{
  "fxSpec": "1.15",
  "object": "signal",
  "pattern": "constellation",
  "params": {
    "steps": 5,
    "progress": 0.6
  }
}

In a binding, progress and quality are targets of their own (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:

check-overrides.ts
import { checkOverrides } from "@sinua/core/dev";

// 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.

On this page