interface

InputField

A rounded glass text input on the Onda Surface, with an optional label above and a placeholder. With `typed` on, the value types itself in (via useTextReveal) behind a blinking caret, with an accent focus ring — all frame-driven and deterministic.

$ npx ondajs add input-field

InputField

A UI text input field on the Onda glass surface: a rounded glass field with an optional uppercase label above and a placeholder. With typed on, the value types itself in character by character (via useTextReveal) behind a blinking accent caret, and an accent focus ring lights the border once typing begins. The caret blink and focus ring are keyed off the frame (not a timer), so the field is fully deterministic. The caret and ring carry the one earned accent.

Props

PropTypeDefaultNotes
valuestringsample emailThe field's value; what types in when typed.
placeholderstringsampleShown while the field is empty.
labelstring"Email"Label above the field. Empty hides it.
typedbooleantrueAnimate the value typing itself in.
delaynumber0Frames before typing starts.
typeDurationnumber36Frames to type the whole value.
focusRingbooleantrueAccent focus ring around the field.
widthnumber640Field width in px (sized for video).
fontSizenumber36Text size in px. Wins over size.
sizesize roleSemantic role resolved to canvas-aware px.
fontFamilystringSpace GroteskUI font stack.
textColor / placeholderColor / labelColor / accentColorstringtoken defaults
placementregion or {x,y,anchor}Canvas placement.

Usage

TSX
import { InputField } from './components/onda/input-field/InputField';

export const SignupScene = () => (
  <InputField label="Email" value="hello@onda.video" typed placement="center" />
);