What is a declarative interface?

Definition

A declarative interface represents a user experience as structured descriptions of components, properties, layout relationships, and permitted interactions. The description states what should appear, while the application renderer controls how approved elements are implemented.

This approach gives a model room to compose useful experiences without allowing it to emit unrestricted interface code. The quality of the result depends on a well-designed schema, a capable component catalog, validation, and sensible fallback behavior.

ELI5

A declarative interface tells an application what the screen should contain instead of writing every drawing step. The application then builds the screen from components it already knows and trusts.

For example, a model might request a heading, a list of approved products, and a comparison button in a two-column layout. The renderer checks that description and uses the product's normal components to display it.

Acronyms and aliases

declarative UI variant

Frequently asked questions

Why use a declarative interface with AI?

It lets a model choose useful structure while the application retains control over rendering, available components, permissions, and validation.

Can a declarative interface still be interactive?

Yes. Its schema can describe permitted interactions and actions, which trusted application code then implements and checks.

Videos explaining declarative interface