API overview
Every page in this section except this one is generated from the doc comments in kiln/. Each
page starts with At a glance, all signatures in one block, so you can look up which arguments
a proc takes without scrolling. Below that every entry has its full signature, the doc comment,
and a table with the type and default of every argument.
| page | what |
|---|---|
| App | run, App, Config, embed, tasks, keys, clipboard |
| Layout | column, row, card, grid, adaptive, flow, field, actions, scroll, … |
| Controls | button, checkbox, toggle, radio, slider, text_field |
| Choices | tabs, segmented, nav, select |
| Display | text, badge, avatar, progress, stat, callout, chip, chips, … |
| Charts | bar_chart, timeline, legend, swatch |
| Tables and trees | table, tree |
| Dates | Date, date_field, calendar, date math |
| Overlays | dialog, drawer, toast, menu, context_menu, tooltip |
| Icons | Icon, icon, load_icon, the built-in ICON_* |
| Theme and units | Theme, Colors, Metrics, catppuccin, the named steps, px, space, … |
| State and ids | id, scope, interact, pointer_events, widget_state, clicked, anim, show / hide, timers |
| Drawing | drawing, draw, paths, fill_path, stroke_path, draw_image, draw_text, transform, clip, opacity, render_image |
Reading a signature
Section titled “Reading a signature”slider :: proc( value: $T, lo, hi: T, disabled := false, key := "",) -> (new_value: T, changed: bool) where intrinsics.type_is_integer(T) || intrinsics.type_is_float(T)$Tis a generic: here any integer or float,loandhihave to be the same type.name := valueis an optional argument with a default, pass it by name:kiln.slider(m.v, 0, 10, key = "volume").- Procedure groups like
button :: proc{button_label, button_icon}pick the right proc by the argument types. Their page lists all members.
Regenerating
Section titled “Regenerating”The pages are made by tools/docgen, a small Odin program that reads the .odin-doc file the
compiler writes:
cd docspnpm api # odin doc + odin run tools/docgenpnpm dev # runs `pnpm api` first, then the dev server