elm-ui is an Elm package for building UIs without writing HTML or CSS directly. Layout and style live in one explicit Elm codebase.
Overview
elm-ui targets developers who want to define web layout and appearance entirely in Elm. It positions itself as a complete alternative to pairing HTML with CSS, drawing on design, layout, and typography concepts rather than mirroring browser stylesheet semantics.
The library aims to keep layout definitions centralized so changes do not require hopping across scattered style files. Many layout mistakes common in CSS cannot be expressed in the API, and performance is treated as a default expectation rather than an afterthought.
The project evolved from a rewrite of the Style Elements library and related Stylish Elephants work. Community members maintain an elm-ui-cookbook with examples, and support discussions happen on the Elm Slack channel dedicated to the library.
Applications using elm-ui still run in the browser; a root layout wrapper should sit at the top of the application to avoid inconsistent rendering in some browsers.
Key features
- Elm-native layout and styling API
- Centralized layout definitions in code
- Modules for background, border, font, and input
- Keyed and lazy rendering helpers
- Design-oriented layout primitives
- Community cookbook of examples
Use cases
- Elm web apps without manual CSS files
- Prototyping UI layout entirely in Elm
- Teaching layout with a typed Elm API
- Migrating from Style Elements-based Elm UIs