Edge
A glow round the inside edge of the screen that follows a voice agent: the whole app is listening.
The edge is a glow round the inside edge of your app's screen. It follows the agent: hidden at rest, faint while listening, wide while speaking, and a segment circling it while thinking. It's colourful by default; saturation: 0 makes it grey ink.
Unlike the other objects it doesn't draw in a square: it fills whatever box it's given, and the engine takes the box's shape into account. See it on a phone-shaped frame in the gallery.
import { SinuaEdge } from "@sinua/web/components";
import type { VoiceSource } from "@sinua/core";
// A glow around the edge of the screen that follows the agent: hidden at rest, faint
// while listening, wide while speaking, a circling segment while thinking.
export function ScreenGlow({ voice }: { voice: VoiceSource }) {
return (
<SinuaEdge
pattern="framing"
voice={voice}
cornerRadius={0.12} // match your screen's or container's corners
label="" // decorative: the conversation is announced elsewhere
style={{ position: "fixed", inset: 0, pointerEvents: "none", zIndex: 10 }}
/>
);
}
- Over everything, out of the way. Put it above your content and let taps through:
pointer-events: noneon the web,.allowsHitTesting(false)in SwiftUI, aBoxoverlay in Compose. - Edge to edge. In SwiftUI add
.ignoresSafeArea(), so it reaches the rounded corners. - Match the corners.
cornerRadiusis a share of the short side: about 0.12 for a phone screen, smaller for a card. - Decorative. Give it an empty label; say what the agent is doing elsewhere on screen.
On the web it's also a tag: <sinua-edge pattern="framing">.
Props
The edge component is SinuaEdge. Pick a look with pattern; each pattern reads the props below. Sizes are engine sizes (20, 32, 64): defaults can differ per size.
| Pattern | Mode | Speed | Values (app data) |
|---|---|---|---|
Framing (framing) | rim | 1× | — |
Framing
pattern: "framing" · mode rim · speed 1× · sizes 20, 32, 64
| Prop | Category | Type | Range | Default | Description |
|---|---|---|---|---|---|
cornerRadius | Appearance | number | 0–0.5 (UI 0–0.3) fraction | 0.12 | Corner radius as a fraction of the box's shorter side; match your screen's or container's corners (0.12 is about a phone screen). |
hue | Appearance | number | 0–360 deg | 265 | Base hue in degrees. |
hueSpread | Appearance | number | 0–360 (UI 0–180) deg | 80 | How far the hue varies round the frame, in degrees (0 = one colour). |
idleOpacity | Appearance | number | 0–1 fraction | 0.35 | The rim's opacity with no voice (0 = hidden until there's a voice). |
ink | Appearance | number | 0–1 fraction | 1 | How present the whole visual is: 1 draws it as the pattern defines it, lower fades everything including its halos. A voice assistant rests below 1 when idle and comes to full ink when it listens. |
saturation | Appearance | number | 0–1 fraction | 0.7 | How colourful the rim is (0 = the grey ink). Colourful by default: a grey rim reads as a border, not a glow. |
thickness | Appearance | number | 0.002–0.2 (UI 0.005–0.1) fraction | 0.015 | The rim's resting width, as a fraction of the box's shorter side. |
flowSpeed | Motion | number | -2–2 (UI -0.5–0.5) | 0.12 | How fast the colours travel round the frame, in turns per second (negative = the other way). |
shimmer | Motion | number | 0–1 fraction | 0 | A bright segment that circles the frame (thinking); 0 = off. |
reach | Energy | number | 0–0.2 (UI 0–0.15) fraction | 0.035 | How much wider the rim grows at full voice, inward only, as a fraction of the shorter side. |