Skip to content

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.

pagewhat
Apprun, App, Config, embed, tasks, keys, clipboard
Layoutcolumn, row, card, grid, adaptive, flow, field, actions, scroll, …
Controlsbutton, checkbox, toggle, radio, slider, text_field
Choicestabs, segmented, nav, select
Displaytext, badge, avatar, progress, stat, callout, chip, chips, …
Chartsbar_chart, timeline, legend, swatch
Tables and treestable, tree
DatesDate, date_field, calendar, date math
Overlaysdialog, drawer, toast, menu, context_menu, tooltip
IconsIcon, icon, load_icon, the built-in ICON_*
Theme and unitsTheme, Colors, Metrics, catppuccin, the named steps, px, space, …
State and idsid, scope, interact, pointer_events, widget_state, clicked, anim, show / hide, timers
Drawingdrawing, draw, paths, fill_path, stroke_path, draw_image, draw_text, transform, clip, opacity, render_image
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)
  • $T is a generic: here any integer or float, lo and hi have to be the same type.
  • name := value is 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.

The pages are made by tools/docgen, a small Odin program that reads the .odin-doc file the compiler writes:

Terminal window
cd docs
pnpm api # odin doc + odin run tools/docgen
pnpm dev # runs `pnpm api` first, then the dev server