You are reading the development docs (2026.12.1-dev.1): features here may not be released yet.
Skip to content

Presets ​

A preset is a named look for a card: one preset: key sets its shape, colours, text, border and how it shows each state. Pick the nearest preset, then override only what you want to change.

  • Buttons, elbows and select menus take the button presets; sliders take the slider presets.
  • Your own config always wins over the preset, and rules win over both while the dashboard runs.

Applying a Preset ​

Set preset: to a preset's name, then add your own keys on top. Anything you set replaces the preset's value for that key; everything else stays as the preset has it.

  • Many button presets hide the entity's name; text.name.show: true brings it back.
  • A preset can set more than style:: the button presets also set min_height and the icon and text layout, and icon and the bar-label-* presets set a fixed height.
yaml
# The lozenge preset as it is (tap to toggle the light)
type: custom:lcards-button
entity: light.living_room
preset: lozenge
text:
  name:
    show: true
tap_action:
  action: toggle
yaml
# The same preset with a grey fill while the light is off
type: custom:lcards-button
entity: light.living_room
preset: lozenge
text:
  name:
    show: true
style:
  card:
    color:
      background:
        inactive: var(--lcards-gray-dark)
tap_action:
  action: toggle
KeyTypeDefaultDescription
presetstring-The preset's name. A button, elbow or select menu takes a button preset; a slider takes a slider preset. Without one a slider draws pills or a gauge, by the entity's domain

Built-in Presets ​

Every preset in the built-in packs, with a picture of each. A -right variant mirrors its preset (rounded or capped end on the other side). A test (tests/core/presets-doc.test.js) keeps these tables in sync with the packs.

Button (lcards-button) ​

base is the foundation the others build on; the editor's preset list leaves it out.

PresetDescription
baseFoundation every other button preset builds on: minimal styles only
lozengeClassic LCARS lozenge: rounded ends, primary colour fill
lozenge-rightLozenge mirrored, with the icon shown on the right
bulletLozenge rounded on the right only, flat on the left: navigation bullets
bullet-rightBullet mirrored: rounded on the left
cappedLozenge with one capped end, rounded on the left: row labels
capped-rightCapped mirrored: rounded on the right
barrelSquare-cornered block
barrel-rightBarrel mirrored
filledSolid filled button with its name shown
filled-rightFilled mirrored
outlineTransparent fill with a border outline
outline-rightOutline mirrored
iconIcon-only button
text-onlyPure text label with no background or border
bar-label-baseBase bar label: a filled bar with a text "break" in it
bar-label-leftBar label with left-aligned text
bar-label-centerBar label with centred text
bar-label-rightBar label with right-aligned text
bar-label-squareBar label with square corners, for large indicators
bar-label-lozengeBar label with rounded ends (pill shape)
bar-label-bullet-leftBar label rounded on the right, flat on the left
bar-label-bullet-rightBar label flat on the right, rounded on the left
bar-label-capped-leftBar label rounded on the left, flat on the right
bar-label-capped-rightBar label rounded on the right, flat on the left
panel-lightSquare-cornered panel with a random LCARS label (light); with an entity, the theme accent when on and the dark structure tone when off. No hover effects
toggle-tabDark square tab with a centred name; a coloured line along the top shows the state
panel-flaggedDark code panel with a thin accent flag on its left edge. No hover effects
panel-darkSquare-cornered panel with a random LCARS label (dark); with an entity, the theme accent when on and the dark structure tone when off. No hover effects

Rendered:

Slider (lcards-slider) ​

base is the foundation the others build on; the editor's preset list leaves it out.

PresetDescription
baseFoundation every other slider preset builds on
pills-basicSegmented pill slider
pills-left-borderPills slider with a left border
pills-left-border-roundedPills with a left border and a rounded free end
gauge-basicRuler-style gauge for displays and controls
gauge-left-borderGauge slider with a left border
gauge-left-border-roundedGauge with a left border and a rounded free end
shaped-verticalVertical shaped slider with exterior text labels (style.shaped.type picks the shape)
shaped-horizontalHorizontal shaped slider with exterior text labels
ringRing gauge: a 270 degree value arc around a large value, the name above it (component: ring)
picard-ringPicard-era ring: near-full thick ring with flat ends, small label over a large value
picard-gauge-verticalPicard-style vertical gauge (component: picard)
picard-gauge-columnPicard Titan column gauge: number caps at both ends, a bracket line, a thin value bar, a range strip, short ticks with their numbers beside them and a small oval thumb

Rendered:

Elbow and select menu ​

The select menu takes the button presets above; the elbow has no presets. An elbow's shape comes from elbow.type (header-left, footer-right, frame and more: see Elbow) and its look from style.

  • The select menu's preset: is a button preset applied to every option button. Its button_template.style, its style and each option's own style go on top, in that order.
  • Charts and data grids have no style presets (their preset keys are animation presets).

How Presets Compose ​

When a card loads, its config is built in layers, and each layer wins over the one before it.

System defaults
    ↓
Preset values
    ↓
Card config (your YAML)  ← wins on conflict
    ↓
Rule patches (runtime)   ← wins over everything
  • You only need to specify what differs from the preset. Anything you don't set falls through to the preset, and anything the preset doesn't set falls through to the system default.
  • Objects merge key by key: a style.border.radius with only top_left keeps the preset's other three corners.
  • On a button with a component, preset names one of the component's own presets instead (see Button components).
  • The card editor's Main Engineering tab shows which layer set each value.

Browsing Available Presets ​

The card editor and the LCARdS config panel both list the presets you can use.

  • Config tab → the preset dropdown: shows the presets for the current card type.
  • Config panel → Pack Explorer: lists every preset from every loaded pack, grouped by card type. The Theme panel of the card editor's Main Engineering tab has a button that opens it.

Packs and Custom Presets ​

Presets come from content packs. The built-in lcards_buttons and lcards_sliders packs provide the presets listed above, and LCARdS loads them when it starts.

  • A pack registered with window.lcards.core.packManager.registerPack() adds its presets to the editor's lists. There is no way yet to install a pack from YAML or the editor.
  • A preset can build on another with extends (extends: button.lozenge): it starts from that preset and changes only what it sets.

See Pack System for how to create packs with custom presets.

  • Styles: the style: block reference for overriding visual properties
  • Rules Engine: rules can patch style properties at runtime, overriding both preset and card config
  • Common Card Properties: shared card keys

Released under the MIT License. | About