UIX Forge (custom:uix-forge), part of UI eXtension, is a custom Lovelace element that combines template-driven configuration with additional behaviours called sparks. Use it to:
- Forge any standard Home Assistant element from templates, allowing the entire element config to react to entity states, user, browser and other template variables.
- Add sparks — self-contained behaviours such that augment the forged element.
- Apply UIX Styling to the forged element, exactly like any other element. Additionally any spark variables and made available in
uixForgetemplate variable.
Base structure (no templates)
type: custom:uix-forge
forge:
mold: card
element:
type: tile
entity: light.living_room
uix:
style: |
ha-card {
--tile-color: teal;
}
forge: does the heavy lifting, taking the element config and creating a forged element.
element: element config where ALL CONFIG can accept Home Assistant Jinja templates.
mold: every forge needs a mold and no different here. The mold is used by the forge to know how to forge the element such that it works in place where it is used. molds supported are card, badge, row, picture-element and section. Note: no guess work is done by the forge, you always need to specifically tell it the mold to use
forge config includes hidden, grid_options (card mold only) and sparks all which accept templates. All molds except section support visibility on the element so you can slide and dice how you wish to show your frontend elements, either using standard visibility config or the forge hidden config.
UIX Styling is supported on both the forge (uix-forge HTML element) and the forged element (Frontend element generated in shadow root of the forge).
Sparks
Every good forge needs a
Spark or two. UIX Forge Sparks are optional behaviours added to a UIX Forge forged element via the forge.sparks list. Each spark has a type key and its own configuration options.
Available sparks:
Tooltip — attach a styled tooltip to any element within the forged element.
Button — insert an interactive ha-buttonelement as a sibling after any element within the forged element.
Attribute — add, replace or remove an attribute of any element within the forged element.
Event — receive DOM events from fire-dom-eventactions and expose their data as template variables.
Tile Icon — insert a ha-tile-iconelement as a sibling before or after any element within the forged element.
State Badge — insert a state-badgeelement as a sibling before or after any element within the forged element.
Grid — apply CSS Grid layout to any container element within the forged element.
Search — find elements within a container by CSS selector and optional text filter, then apply class, attribute, or text mutations to all matches.
Map — preserve the zoom level and centre of a map card across Home Assistant state updates.
Lock — overlay a lock icon on any element to block interaction until the user passes a PIN, passphrase, or confirmation challenge.
Spark highlights
- Event spark brings the ability to change element config on the fly without relying on sensors. A great example is Using UIX Forge event spark to change a camera view
- Grid spark allows for most of what
custom:layout-carddoes for sections, giving an alternative for that custom card. - Lock spark allows to both unlock and execute the protected element action in one step.

- Map spark, while simple, provides the required memory for a map card when using templates for config, meaning it does not reset view zoom and position every time the templae updates.

- Tooltip spark - often requested action is to just have a tooltip. Combined with the attribute spark you can blow away the browser tooltips based on title attribute and add your own rich tooltips, all with templates supported.
UIX Forge now available and refined in UI eXtension 6.1.0
Thanks to @Mariusthvdb for testing many 6.1.0 betas ![]()
Is there a Spark you desire
Add a Feature Request on GitHub and we can start the ball rolling.




