Examples
Explore these examples to learn how to build UIs with Constela.
Counter
A basic counter example demonstrating state management with increment, decrement, and reset actions.
Todo List
A todo list example demonstrating list state management, input binding, and iteration with the each loop.
Fetch List
An example demonstrating how to fetch data from an API with loading states and error handling.
Router
A multi-page routing example demonstrating navigation, nested routes, and dynamic parameters.
Portals, Timers, Observers & Validity
Demo of Portals, Timers (auto-close modal), Intersection Observer, and Form Validity.
Call & Lambda
Filter and transform data using call expressions with lambda functions. Demonstrates array filtering, string methods, and computed values.
Array Expression
Demonstrates dynamic array construction using the array expression feature.
Theme System
Theme system with light/dark/system mode switching, CSS variables, and persistent storage.
Accessible Form
A form demonstrating a11y best practices with proper headings, aria-labels, input validation, and CSS transitions.