Skip to content

Presets ​

Presets are named collections of style properties. Applying a preset to a card sets its shape, colours, typography, border, and state appearances in one step, instead of writing all those properties manually.


Applying a Preset ​

yaml
type: custom:lcards-button
entity: light.living_room
preset: lozenge

That's it. The preset fills in every visual detail. You can then override any individual property on top:

yaml
type: custom:lcards-button
entity: light.living_room
preset: lozenge
style:
  card:
    color:
      background:
        inactive: var(--lcards-gray-dark)

Card-level config values always win; they are layered on top of the preset.


Built-in Presets ​

These tables list every preset in the built-in packs (src/core/packs/style-presets/). 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) ​

PresetDescription
baseFoundation every other button preset builds on: minimal styles only
lozengeClassic LCARS lozenge: rounded ends, primary colour fill
lozenge-rightLozenge mirrored
bulletLozenge rounded on one side only, flat on the other: navigation bullets
bullet-rightBullet mirrored
cappedLozenge with one capped end: row labels
capped-rightCapped mirrored
barrelSquare-cornered block
barrel-rightBarrel mirrored
filledSolid filled button
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-lightNon-interactive square-cornered panel with a random LCARS label (light)
panel-darkNon-interactive square-cornered panel with a random LCARS label (dark)

Rendered:

Slider (lcards-slider) ​

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
picard-gauge-verticalPicard-style vertical gauge

Rendered:

Elbow and select menu ​

The elbow accepts the button presets above (preset: styles its segments the way it styles a button). Its geometry is chosen separately with elbow.type (header-left, header-right, footer-left, footer-right, and more: see Elbow).

The select menu's preset: is a button preset applied to every option button.

Charts and data grids have no style presets (their preset keys are animation presets).


How Presets Compose ​

When a card loads, preset resolution works in layers:

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.


Browsing Available Presets ​

The card editor surfaces presets in two ways:

  • Config tab → the "Preset" dropdown: shows all presets for the current card type
  • Config Panel → Pack Explorer: lists all presets from every installed pack, grouped by card type

Packs and Custom Presets ​

Presets come from content packs. The built-in lcards_buttons and lcards_sliders packs provide the presets listed above. Additional packs (including community packs) can add their own presets; these appear in the editor's preset list automatically once the pack is installed.

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