Ada Extensions
Reference

UI nodes

Every AdanotchKit.ui helper and the node it builds.

Every helper returns a plain JSON node; you can write nodes by hand too ({ type: "text", value: "42" }). A view holds 2000 nodes at most, 32 levels deep.

Shared types

  • Tone: "default" | "secondary" | "accent" | "success" | "warning" | "danger"
  • TextStyle: "title" | "body" | "caption" | "mono" | "display"
  • Symbol: an SF Symbols name
default

Temel metin ve simgeler

Örnek
secondary

Yardımcı metin ve etiketler

Örnek
accent

Vurgu, bağlantı, sayaç

Örnek
success

Tamamlanan, onaylanan

Örnek
warning

Uyarı, bekleyen durum

Örnek
danger

Kritik sınır, hata

Örnek

Text and icons

HelperOptionsNote
text(value)style, tonevalue is a string or a number
markdown(value)toneBold, italic, inline code, https:// links
icon(name)toneSF Symbols
image(src)shape: "rounded" | "circle", sizeHTTPS, network: domains only; size 16–120, default 40
badge(text)toneA small label

Data

HelperOptionsNote
ring(value)label, tone0–100
gauge(label, value)tone0–100; 42% in the compact area
progress(value)tone0–100; a small ring in the compact area
chart(values)style: "line" | "area" | "bar", min, max, toneUp to 500 values
timer(date)style: "timer" | "relative", textStyle, toneCounts on its own; date is a Date or ms
Data Nodes Previewring, gauge, progress, and chart components
80%CPU
45%RAM
Disk Storage64%

Layout

HelperOptionsNote
stack(children)axis: "h" | "v", spacing, align: "start" | "center" | "end"Vertical by default; empty children are skipped
grid(children)columns, spacing
scroll(child)maxHeight
tabs(tabs)—{ title, icon?, content }[]; switching doesn't call the extension
divider()—
spacer()—Pushes its neighbours apart in a stack

Controls

HelperOptionsonAction value
button(label, action)icon, primary, valuevalue, or null
toggle(label, action, isOn)—The new boolean
slider(action, value)min (0), max (100), step, labelThe number it was let go at
textField(action)value, placeholder, changeActionThe text, on Return; with changeAction, while typing too
picker(action, value, options)labelThe picked value; options are strings or { value, label }
list(items)—The clicked row's value
Control Nodes Previewbutton, toggle, slider, and badge components
v1.0
Display Brightness70

ListItem

Prop

Type

The view

interface View {
  compact?: { leading?: CompactNode | null; trailing?: CompactNode | null } | null;
  expanded?: Node | null;
}

// What fits beside the notch:
type CompactNode = TextNode | IconNode | BadgeNode | TimerNode | GaugeNode | RingNode | ProgressNode;
Kapalı Adacompact.leading ve compact.trailing çentiğin iki yanında durur
34%
Açılmış Adaexpanded alanına verdiğin düğüm, çentikten açılan kartta çizilir
SistemCanlı
42%CPU
68%RAM
Macintosh HD64%

On this page