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

Button Card ​

custom:lcards-button

The LCARS building block: a toggle button, a label, a panel or a section header, or a D-pad, alert symbol or round display. Most buttons need only an entity and a preset.

  • A button is drawn one of three ways: a preset shape, a component (a D-pad, the alert symbol or bracket arcs), or your own svg.
  • The Elbow card is built on the button, so most of these pages apply to elbows too.

Try it

  • The card editor's tabs cover the options on these pages, with a live preview.
  • The Playground lets you edit button YAML here in the docs and see the result.
PageCovers
Style, Text and HoverBackground and border colours, text, hover and cursor, filters
IconsThe icon, its area beside the text, per-state icons, the divider
Textures and BackgroundsMoving textures inside the shape and animated backgrounds
D-pads, Alerts and BracketsThe D-pad, Voyager D-pad, alert symbol and brackets
Custom SVGYour own SVG with tappable parts
PlaygroundEdit YAML and see the button live

Quick start ​

Two examples to start from: a light you toggle, and a section header.

  • Presets hide their text until you ask for it: text.name.show: true shows the entity's name.
yaml
type: custom:lcards-button
entity: light.living_room
preset: lozenge
text:
  name:
    show: true
tap_action:
  action: toggle
yaml
type: custom:lcards-button
preset: bar-label-left
interactive: false
text:
  label:
    content: NAVIGATION

Presets ​

preset picks the shape and the text layout. Any style, text or icon key you set overrides the preset.

Standard Buttons ​

Filled, outlined and text-only buttons with rounded, half-rounded or square ends. The -right versions put the icon area on the right.

  • The toggle-tab line is the tab's top border, so it can go on any side at any thickness: style.border.width.left: 6 with top: 0 moves it to the left edge.
PresetDescription
lozengeRounded at both ends, icon area on the left
lozenge-rightRounded at both ends, icon shown on the right
bulletFlat left end, rounded right end, icon area on the left
bullet-rightRounded left end, flat right end, icon shown on the right
cappedRounded left end, flat right end, icon area on the left
capped-rightFlat left end, rounded right end, icon shown on the right
barrelSquare corners, no border, icon area on the left
barrel-rightSquare corners, no border, icon area on the right
filledSquare filled block with the name on the right
filled-rightSquare filled block with the name on the left
outlineTransparent background with a border (Picard style)
outline-rightLike outline, icon area on the right
iconSquare icon-only button with rounded corners
text-onlyNo background or border: text alone
toggle-tabDark square tab with a centred name; a coloured line along the top shows the state

Panels ​

Square-cornered blocks with a code label, for number columns and fillers. With an entity they show the theme accent when on and the dark structure tone when off.

  • Panels are decorative: they set interactive: false, so they don't change colour on hover.
PresetDescription
panel-lightLight structure block with a code label
panel-darkDark structure block with a code label
panel-flaggedDark code block with a thin accent flag on its left edge

Bar Labels ​

Horizontal bars whose text sits on a black background that breaks the bar: the classic LCARS header. The text grows with the card's height.

  • A bar label is 56 px tall (one sections-view row) unless you set height.
PresetDescription
bar-label-baseBar label foundation: filled bar, text that scales with the height, centred
bar-label-leftText on the left
bar-label-centerText centred
bar-label-rightText on the right
bar-label-squareSquare corners
bar-label-lozengeRounded at both ends
bar-label-bullet-leftFlat left end, rounded right end
bar-label-bullet-rightRounded left end, flat right end
bar-label-capped-leftRounded left end, flat right end
bar-label-capped-rightFlat left end, rounded right end

Card options ​

The button's own top-level keys. Each block has its own page; this table links to it.

  • The button also takes the keys every LCARdS card takes (height, width, grid_options, id, tags, tap_action, hold_action, double_tap_action, animations, sounds, data_sources, rules ...): see Common card properties.
  • Set one of preset, component or svg. With component, preset names the component's own preset (such as condition_red on the alert).
yaml
type: custom:lcards-button
entity: light.living_room
preset: lozenge-right
icon: mdi:sofa
text:
  name:
    show: true
tap_action:
  action: toggle
hold_action:
  action: more-info
KeyTypeDefaultDescription
typestringrequiredcustom:lcards-button
entitystring-The entity the button shows and acts on
presetstring-The shape: see Presets. With component, the component's preset
componentstring-dpad, dpad_voyager, alert or brackets: see D-pads, Alerts and Brackets
svgobject-Your own SVG: see Custom SVG
styleobjectfrom the presetBackground, border, cursor and text defaults: see Style, Text and Hover
textobjectfrom the presetText on the card: see Text fields
interactivebooleantrue with an action or a switchable entity, else falsefalse: no hover colour or hover animations. See interactive
filterslist-CSS and SVG filters: see filters
show_iconbooleanfalse, true on some presetsShow the icon: see Icons
iconstringthe entity's iconThe icon: see Icons
icon_areastringleftWhere the icon's area sits: see Icons
icon_area_sizenumberfits the iconWidth (or height) of the icon area: see Icons
icon_area_backgroundcolour / state map-Background of the icon area: see Icons
icon_styleobject-Icon colour, size, position: see icon_style
dividerobjectfrom the presetThe line between icon and text: see divider
shape_textureobject-A texture inside the shape: see shape_texture
background_animationlist-An animated background: see background_animation
dpadobject-D-pad segments: see dpad
dpad_voyagerobject-Voyager D-pad segments: see dpad_voyager
bracketsobject-Bracket segments: see Brackets
alertobject-Alert colours and presets: see alert
rangeslist-Switch the component's preset by value: see ranges
ranges_attributestringthe stateThe attribute that range colours and ranges compare
state_attributestring-The attribute whose value picks exact-match colours
state_classificationobject-Which states count as active or inactive: see state_classification

Released under the MIT License. | About