Declare
A domain-specific UI language for building verifiable browser interfaces, with a compiler, dev server, formatter and verify command designed for use with AI agents.
At a Glance
Declare language, compiler, tools and runtime released under the MIT License.
Engagement
Available On
Alternatives
Listed Dec 2026
About Declare
Declare is a UI language created by David Temkin for building browser interfaces in verifiable code. The project describes it as a DSL for user interfaces, in the way SQL is a DSL for database queries. Its homepage is itself written in Declare, and the project is MIT licensed.
What It Is
Declare is a programming language and toolchain for people and AI agents that build custom, fluid user interfaces. Layout, motion, states, theming and drawing are part of the language rather than libraries added on top. The site presents complete example programs, including a zooming calendar, a windowed desktop and a million-issue tracker, each of which can be run or opened in a live source viewer in the browser.
Tools for AI-assisted development
The project ships several tools aimed at helping an AI agent write correct code:
- A Declare skill that packages the language, library, conventions and working loop, plus declare-help for looking up names or error codes.
- A compiler whose diagnostics name the broken rule and the valid rewrite.
- An Inspector that explains why a live value is what it is, what it depends on and what happens if it changes.
- A verify command that checks an app in six steps, from parsing to screenshot comparison, and stops at the first problem.
Reactive model and examples
Values are expressed as relationships that stay true and rerun, so a single value can drive a number, a bar's length and its color together. The site reports a ticket-buying app built twice by the same agent, with the Declare version at 1,279 lines against 2,666 for React, and notes these were single runs rather than a benchmark.
Collections
Collections with tools like Declare
- Harness Setup
Collection by @joemseifi · has BAML
Add Declare to one of your collections.
Community Discussions
Be the first to start a conversation about Declare
Share your experience with Declare, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Declare language, compiler, tools and runtime released under the MIT License.
- MIT License
- Compiler, verifier, and Inspector tooling
- Installable Declare skill for AI agents
Capabilities
Key Features
- UI-focused domain-specific language
- Built-in layout, motion, states, theming and drawing
- Compiler with diagnostics that name the rule and suggest a rewrite
- Dev server
- Formatter
- Six-step verify command including screenshot comparison
- Inspector for explaining live values and dependencies
- Installable Declare skill for AI agents
- Built-in virtualization
- Live in-browser editing and source viewer
