Skip to content

Elbow Card

custom:lcards-elbow

The Elbow card creates the iconic LCARS corner/cap shapes — the L-shaped coloured bars that frame sections of an LCARS interface. Extends the button card so it inherits text, actions, rules, animations, and templates.


Quick Start

yaml
type: custom:lcards-elbow
elbow:
  type: header-left
  segment:
    bar_width: 90
    bar_height: 20

Top-Level Options

OptionTypeDescription
typestringcustom:lcards-elbow (required)
elbowobjectElbow geometry and styling (required)
entitystringEntity to monitor (for state-based styling)
idstringCard ID for rule targeting
tagslistTags for rule targeting
textobjectText labels — see Text Fields
styleobjectCard background, border, text styles — see Button card
tap_actionobjectTap action — see Actions
hold_actionobjectHold action
double_tap_actionobjectDouble-tap action
animationslistCard animations — see Animations
background_animationlist / objectCanvas background animations — see below
shape_textureobjectSVG texture inside the elbow shape fill

Elbow Types

TypeCorner position
header-leftTop-left
header-rightTop-right
footer-leftBottom-left
footer-rightBottom-right

Additional types (open corners, contained styles) are available from installed packs.


Elbow Styles

Simple (default)

Single elbow — one curved L-shape.

yaml
elbow:
  type: header-left
  style: simple
  segment:
    bar_width: 90       # Vertical bar thickness (px)
    bar_height: 20      # Horizontal bar thickness (px)
    outer_curve: auto   # Corner radius — 'auto' = bar_width / 2 (LCARS formula)
    color:
      default: "var(--lcards-orange)"
      active: "var(--lcards-orange-medium)"

Segmented (TNG / Picard style)

Two concentric elbows with a gap — the double-elbow look from Star Trek TNG.

yaml
elbow:
  type: header-left
  style: segmented
  segments:
    gap: 4              # Gap between inner and outer elbow
    factor: 4           # Size ratio: outer = 3/4, inner = 1/4
    colors:
      outer: "var(--lcards-orange)"
      inner: "var(--lcards-moonlight)"

Segment Options (Simple Style)

OptionTypeDefaultDescription
bar_widthnumber / "theme"90Vertical bar thickness in px. Use "theme" to bind to input_number.lcars_vertical
bar_heightnumber / "theme"20Horizontal bar thickness in px. Use "theme" to bind to input_number.lcars_horizontal
outer_curvenumber / "auto""auto"Corner arc radius. auto = bar_width / 2
inner_curvenumberInner arc radius (omit for LCARS formula: outer / 2)
colorstring / objectFill colour — state map supported

Segments Options (Segmented Style)

OptionTypeDefaultDescription
gapnumber4Gap in px between outer and inner elbow
factornumber4Size division factor
colors.outerstringmain colourOuter elbow colour
colors.innerstringmain colourInner elbow colour

HA-LCARS Theme Binding

If you use the HA-LCARS theme, bind bar dimensions to the theme helpers to keep all elbows synchronised:

yaml
elbow:
  type: footer-right
  segment:
    bar_width: theme     # Reads input_number.lcars_vertical
    bar_height: theme    # Reads input_number.lcars_horizontal

Changing the helper value updates every elbow using theme binding simultaneously.


Text Labels

Elbows inherit the full button text system. Common use: a label on the horizontal bar.

yaml
type: custom:lcards-elbow
elbow:
  type: header-left
  segment:
    bar_width: 120
    bar_height: 22
text:
  section:
    content: NAVIGATION
    position: top-right
    font_size: 11
    font_weight: bold
    color: "var(--lcards-moonlight)"

See Text Fields for the complete reference.


Background Animation Inset

Elbow cards support a canvas-level inset on background_animation so the animation fills only the open content area, not the LCARS bars.

Use inset: auto to let the card automatically derive the correct inset from its bar geometry:

yaml
type: custom:lcards-elbow
elbow:
  type: header-left
  segment:
    bar_width: 90
    bar_height: 20
background_animation:
  inset: auto       # canvas sized to avoid the elbow bars
  effects:
    - preset: grid
      config:
        line_spacing: 40
        color: "alpha(var(--lcards-orange), 0.3)"

Manual inset

Supply explicit pixel values when you need precise control:

yaml
background_animation:
  inset:
    top: 20         # height of horizontal top bar
    left: 90        # width of vertical left bar
    right: 0
    bottom: 0
  effects:
    - preset: starfield
      config:
        count: 150

Note: inset: auto is computed from the resolved bar geometry at runtime and updates automatically when theme bar dimensions change via input_number helpers.


Shape Texture

Elbow cards support the same shape_texture feature as button cards — an SVG-native texture or animation clipped to the elbow shape fill (simple and segmented styles). Configuration is identical.

See Button card — Shape Texture for the full preset reference and examples.


Examples

Standard header cap pair

yaml
# Left cap
type: custom:lcards-elbow
elbow:
  type: header-left
  segment:
    bar_width: theme
    bar_height: theme

# Right cap
type: custom:lcards-elbow
elbow:
  type: header-right
  segment:
    bar_width: theme
    bar_height: theme

State-reactive elbow

Changes colour when a sensor is above threshold (using Rules Engine):

yaml
type: custom:lcards-elbow
id: alert-cap
elbow:
  type: header-left
  segment:
    bar_width: 90
    bar_height: 20
    color:
      default: "var(--lcards-orange)"

Then define a rule that patches id: alert-cap when the sensor is high.