Sinua
Catalog

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.

edge-react.tsx
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: none on the web, .allowsHitTesting(false) in SwiftUI, a Box overlay in Compose.
  • Edge to edge. In SwiftUI add .ignoresSafeArea(), so it reaches the rounded corners.
  • Match the corners. cornerRadius is 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.

PatternModeSpeedValues (app data)
Framing (framing)rim1×—

Framing

pattern: "framing" · mode rim · speed 1× · sizes 20, 32, 64

PropCategoryTypeRangeDefaultDescription
cornerRadiusAppearancenumber0–0.5 (UI 0–0.3) fraction0.12Corner 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).
hueAppearancenumber0–360 deg265Base hue in degrees.
hueSpreadAppearancenumber0–360 (UI 0–180) deg80How far the hue varies round the frame, in degrees (0 = one colour).
idleOpacityAppearancenumber0–1 fraction0.35The rim's opacity with no voice (0 = hidden until there's a voice).
inkAppearancenumber0–1 fraction1How 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.
saturationAppearancenumber0–1 fraction0.7How colourful the rim is (0 = the grey ink). Colourful by default: a grey rim reads as a border, not a glow.
thicknessAppearancenumber0.002–0.2 (UI 0.005–0.1) fraction0.015The rim's resting width, as a fraction of the box's shorter side.
flowSpeedMotionnumber-2–2 (UI -0.5–0.5)0.12How fast the colours travel round the frame, in turns per second (negative = the other way).
shimmerMotionnumber0–1 fraction0A bright segment that circles the frame (thinking); 0 = off.
reachEnergynumber0–0.2 (UI 0–0.15) fraction0.035How much wider the rim grows at full voice, inward only, as a fraction of the shorter side.

On this page