# Declare: a UI language built so AI can tell when it's wrong

Original title: Declare is a UI language for you and your AI

> Hacker News story 50622854 · language: en · submitted 2026-11-24
> Web version: https://zeli.app/story/50622854
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 99 · by [ilamont](<https://news.ycombinator.com/user?id=ilamont>) · 💬 84
[original](<https://davidtemkin.github.io/declarelang/>) · [HN discussion](<https://news.ycombinator.com/item?id=50622854>)

## Summary

Declare is a new UI language where layout, motion, states, theming, and drawing are part of the language itself rather than bolted-on libraries. Demo apps include a zoomable calendar (568 lines), a full desktop with draggable windows (3,529 lines), and a million-issue tracker with no virtualization code. The pitch centers on AI: a six-rung verification ladder from parse to pixels lets an agent check its own work. In one early test, the same agent built a ticket app in 1,279 Declare lines versus 2,666 in React, passing 11 hidden checks to React's six.

## Key quote

> Your AI can write the code. Can it tell when it's wrong? In Declare, yes.

## HN discussion (84 comments)

### [saidinesh5](<https://news.ycombinator.com/item?id=50624498>)

> I think Qt/QML really reached hit sweet spot for me when it comes to describing UIs (ignore if any syntax errors, doing this from memory):
>
> For eg. compare this:
>
> \`\`\`
>
> Window {
>
> textColor: "slategray"
>
> property int v: 40
>
> ColumnLayout {
>
> id: layout
>
> anchors.fill: parent
>
> spacing: 20
>
> Text {
>
> id: number
>
> Layout.alignment: Qt.AlignHCenter
>
> font.pixelSize: 70
>
> text: v
>
> }
>
> ProgressBar {
>
> id: progressBar
>
> Layout.alignment: Qt.AlignHCenter
>
> value: v/100
>
> color: v < 50 ? "dodgerblue" : "turquoise"
>
> }
>
> }
>
> MouseArea {
>
> anchors.fill: parent
>
> onClick: v = (v+20)%100
>
> }
>
> }
>
> \`\`\`
>
> with Declare:
>
> \`\`\`
>
> App [ textColor = slategray,
>
> group: View [ x = center, y = center, width = 80%,
>
> layout: SimpleLayout [ axis = y, spacing = 20 ],
>
> number: Text [ width = 100%, textAlign = center,
>
> fontSize = 70, fontWeight = bold, text = { "" + v } ],
>
> bar: Gauge [ width = 100%, value = { v },
>
> tint = { v < 50 ? cool : warm }, accessibilityLabel = "v" ],
>
> hint: Text [ width = 100%, textAlign = center,
>
> text = "click anywhere to change v" ]
>
> ],
>
> v: number = 40,
>
> cool: Color = dodgerblue,
>
> warm: Color = turquoise,
>
> onClick() { v = (v + 20) % 100 }
>
> ]
>
> \`\`\`

### [abrookewood](<https://news.ycombinator.com/item?id=50624469>)

> The LLM language is pretty off putting: "Say what you mean. Exactly" and then in the code comments "// One value, v, and three things that follow it". It's such an awful way of writing.

### [samrus](<https://news.ycombinator.com/item?id=50624512>)

> The claudish here got unreadable after a while. The project's thesis really should be written by a human. Shame becuase it seems like an interesting idea

### [mtford](<https://news.ycombinator.com/item?id=50624171>)

> First contact marketing pages and core documentation should be written by a human. This sounded interesting but my eyes glazed over as soon as I detected the AI smell...

### [skybrian](<https://news.ycombinator.com/item?id=50623917>)

> This looks quite nicely done. I'm reluctant to try it solely because the website has so much marketing-style writing (probably AI-generated) and I'm not sure I want to read more of it.
>
> It should probably say up front that this is an npm package along with the tooling for it, and the output runs in a browser.

---

## Cite

- Page: https://zeli.app/story/50622854
- Date: 2026-11-24
- Source: davidtemkin.github.io (https://davidtemkin.github.io/declarelang/)
- Hacker News: https://news.ycombinator.com/item?id=50622854

## Other languages

- zh: https://zeli.app/zh/story/50622854 · markdown: https://zeli.app/zh/story/50622854.md
- ja: https://zeli.app/ja/story/50622854 · markdown: https://zeli.app/ja/story/50622854.md
- ko: https://zeli.app/ko/story/50622854 · markdown: https://zeli.app/ko/story/50622854.md
- de: https://zeli.app/de/story/50622854 · markdown: https://zeli.app/de/story/50622854.md
- es: https://zeli.app/es/story/50622854 · markdown: https://zeli.app/es/story/50622854.md
- ru: https://zeli.app/ru/story/50622854 · markdown: https://zeli.app/ru/story/50622854.md
