ludic/examples/library/ui_component_parts/Counter.ludic
Orkuncakilkaya 281ebc23e1 ludic schema: a components section and a natives list (R4)
Each UI component: module, place, doc, xml and lss paths, props and state
(type, default as written, place, doc), states_read (the header's states),
derived fields with their types, functions and events as the template calls
them (states and instance stripped), and the native tags its template uses.
natives: every ui_native / ui_native_input call with a literal tag - tag, via,
handler, place. schema_version stays 1; the lists are additions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:36:04 +03:00

9 lines
315 B
Text

# Counter.ludic — a component: what it takes (props), keeps (state), works out and does
component Counter {
prop label: string
prop step: int = 1 # how much one press adds
state count: int = 0
doubled: int = count * 2
function big() -> bool { return count > 3 }
on bump() { count += step }
}