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

Animation Preset Reference ​

Every built-in animation preset, with the keys it takes and their defaults. Pick a preset with preset: on an entry in a card's animations list (Animations), and give its own keys under params.

  • The timing keys duration, ease, loop, alternate and delay can go at the top of the entry or under params; when both are set, the top-level value wins. The defaults in the tables below are each preset's own, used when you set neither.
  • On a preset that runs one anime.js animation, a timing key the preset doesn't set itself still reaches anime.js: a loop, alternate or delay on the entry applies even when the preset's table doesn't list it.
  • Without target, a preset animates the whole card. Aim it at one part with target: .button-bg is a button's shape and [data-field-id='name'] one of its text fields.
  • Most presets have a playground under their table: change the keys and watch the result.

Motion Presets ​

Presets that move, scale, turn or fade the whole target. They suit a button's feedback on tap, an attention loop while something is on, or an entrance on load.

pulse ​

A breathing effect: the target grows a little and brightens, then settles back, over and over. Use it to draw the eye to a card while something needs attention.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: PULSE
    show: true
animations:
  - trigger: on_load
    preset: pulse
KeyTypeDefaultDescription
max_scalenumber1.15Peak scale (alias scale)
max_brightnessnumber1.4Peak brightness; 1 is normal
durationnumber1200ms each way (out, then back with alternate)
easestringinOutSineEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
alternatebooleantruePlay back the other way on each loop
pulse

Loading live preview…

glow ​

An animated drop-shadow bloom round the target. The shadow grows from blur_min to blur_max and back.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: GLOW
    show: true
animations:
  - trigger: on_load
    preset: glow
    params:
      color: var(--lcars-orange)
      blur_max: 14
KeyTypeDefaultDescription
colorcolourvar(--lcars-blue)Glow colour (alias glow_color)
blur_minnumber0Smallest shadow blur, px
blur_maxnumber10Largest shadow blur, px
durationnumber1500ms each way
easestringinOutSineEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
alternatebooleantruePlay back the other way on each loop
glow

Loading live preview…

shake ​

A quick side-to-side vibration that ends where it started. Good on tap, or on an entity change that means "no".

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO SHAKE
    show: true
animations:
  - trigger: on_tap
    preset: shake
KeyTypeDefaultDescription
intensitynumber10Largest displacement, px
frequencynumber4Number of side-to-side shakes
durationnumber500Whole shake, ms
easestringinOutSineEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
shake

Loading live preview…

bounce ​

An elastic scale bounce: the target pops up and settles, a few times.

  • With more than one bounce (the default is 3), the preset sets the easing to outQuad and multiplies duration by bounces, so the default bounce takes 2400 ms. Your own ease is not used then; set bounces: 1 for one bounce with your own easing and duration.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO BOUNCE
    show: true
animations:
  - trigger: on_tap
    preset: bounce
    params:
      scale_max: 1.1
      bounces: 2
      duration: 300
KeyTypeDefaultDescription
scale_maxnumber1.2Peak scale of the first bounce; later bounces are a little lower
bouncesnumber3Number of bounces
durationnumber800ms per bounce
easestringoutElasticEasing, used only when bounces is 1 or less
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
bounce

Loading live preview…

rotate ​

Turns the target round its centre. Set from and to for any angle, or direction for a full turn.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO TURN
    show: true
animations:
  - trigger: on_tap
    preset: rotate
    params:
      direction: counterclockwise
More about rotate
  • direction wins: when direction is set, from and to are ignored. A value other than clockwise or counterclockwise logs a warning and turns clockwise.
KeyTypeDefaultDescription
fromnumber0Start angle, degrees
tonumber360End angle, degrees
directionstring-clockwise (0 to 360) or counterclockwise (0 to -360)
durationnumber1000ms
easestringlinearEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
rotate

Loading live preview…

A slow opacity blink between full and dim.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: BLINK
    show: true
animations:
  - trigger: on_load
    preset: blink
KeyTypeDefaultDescription
max_opacitynumber1Brightest opacity
min_opacitynumber0.3Dimmest opacity
durationnumber1200ms each way
easestringlinearEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
alternatebooleantruePlay back the other way on each loop
blink

Loading live preview…

strobe ​

A rapid opacity flicker between full and off. The same as blink with a short cycle and a full fade.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: STROBE
    show: true
animations:
  - trigger: on_load
    preset: strobe
    params:
      min_opacity: 0.2
KeyTypeDefaultDescription
max_opacitynumber1Brightest opacity
min_opacitynumber0Dimmest opacity
durationnumber100ms each way
easestringlinearEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
alternatebooleantruePlay back the other way on each loop
strobe

Loading live preview…

skew ​

Slants the target horizontally, vertically or both.

  • Without from_skewX or from_skewY the skew starts at 0; set either to start from another slant.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO SKEW
    show: true
animations:
  - trigger: on_tap
    preset: skew
    loop: 1
    alternate: true
    params:
      skewX: -15
KeyTypeDefaultDescription
skewXnumber0End horizontal skew, degrees
skewYnumber0End vertical skew, degrees
from_skewXnumber0Start horizontal skew, degrees
from_skewYnumber0Start vertical skew, degrees
durationnumber600ms
easestringinOutQuadEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
skew

Loading live preview…


fade ​

A plain opacity change from one value to another. From 0 to 1 it is a fade-in entrance; the default dims the target to 0.3.

  • With alternate, the target is set back to its from opacity when the animation ends.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: FADE IN
    show: true
animations:
  - trigger: on_load
    preset: fade
    params:
      from: 0
      to: 1
      duration: 1500
KeyTypeDefaultDescription
fromnumber1Start opacity
tonumber0.3End opacity
durationnumber1000ms
easestringlinearEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
fade

Loading live preview…

slide ​

Slides the target in from one side to its place. Use it for an entrance on load or on show.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: SLIDE IN
    show: true
animations:
  - trigger: on_load
    preset: slide
    params:
      from: left
      distance: 60
More about slide
  • up and down: an older pair, also accepted, maps the opposite way to what the names suggest: up behaves like bottom and down like top. Use left, right, top and bottom.
  • An unknown side logs a warning and slides in from the right.
KeyTypeDefaultDescription
fromstringrightThe side it comes from: left, right, top or bottom (alias direction)
distancenumber / string100How far it travels: px, or a string with %
durationnumber600ms
easestringoutQuadEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
slide

Loading live preview…

scale ​

Scales the target from one size to another. Short and quick by default, for button feedback.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO SCALE
    show: true
animations:
  - trigger: on_tap
    preset: scale
    loop: 1
    alternate: true
KeyTypeDefaultDescription
scalenumber1.1End scale
fromnumber1Start scale
durationnumber200ms
easestringoutQuadEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
scale

Loading live preview…

scale-reset ​

Returns the target to its normal size from wherever it is. Pair it with on_leave to undo a scale on on_hover.

  • It never loops or alternates, whatever loop and alternate say.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: HOVER ME
    show: true
animations:
  # grow on hover
  - trigger: on_hover
    preset: scale
    params:
      scale: 1.1
  # back to normal when the pointer leaves
  - trigger: on_leave
    preset: scale-reset
KeyTypeDefaultDescription
durationnumber200ms
easestringoutQuadEasing
scale-reset

Loading live preview…


Text Animation Presets ​

Presets that animate a card's text character by character, word by word or line by line. Without target they animate every text field of the card; target: "[data-field-id='name']" limits one to a single field.

text-reveal ​

Characters, words or lines fade and rise into place one after another.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: SENSOR ARRAY ONLINE
    show: true
animations:
  - trigger: on_load
    preset: text-reveal
    target: "[data-field-id='name']"
  - trigger: on_tap
    preset: text-reveal
    target: "[data-field-id='name']"
KeyTypeDefaultDescription
splitstringcharsThe unit: chars, words or lines
directionstring / numberfirstWhere the stagger starts: first, last, center, random, or a unit's index
staggernumber50ms between one unit and the next
durationnumber800ms per unit
easestringoutQuadEasing
from_opacitynumber0Start opacity of each unit
from_ynumber20Start offset below its place, px
loopboolean / numberfalseLoop forever, or a number of extra plays
LCARDS

Loading live preview…

text-decode ​

An LCARS readout decode: each text line starts as glyph noise and resolves character by character. It is built on anime.js's scrambleText. Good on on_show, and on on_entity_change for a value that decodes again when it changes.

  • Stopping it puts the real text back; under reduced motion the text shows at once.
yaml
type: custom:lcards-button
preset: lozenge
entity: sensor.desk_sensor_temperature
tap_action:
  action: none
text:
  name:
    content: DESK SENSOR
    show: true
  state:
    show: true
animations:
  - trigger: on_show
    preset: text-decode
  # the reading decodes again when it changes
  - trigger: on_entity_change
    entity: sensor.desk_sensor_temperature
    preset: text-decode
    params:
      chars: numbers
      duration: 600
KeyTypeDefaultDescription
durationnumber1000ms for the whole decode of a line
charsstringA-Z0-9Scramble glyphs: a named set (uppercase, lowercase, numbers, symbols, blocks, shades, braille) or characters and ranges such as A-F0-9 (put a literal - first or last)
fromstringleftWhere the reveal starts: left, right, center or random
reversedbooleanfalseReveal in the opposite order (from: center then reveals the edges first)
cursorboolean / stringfalseCharacters at the reveal edge: true for _, or a string. Best seen on a slower decode
perturbationnumber-0 to 1: random timing per character, for a less even reveal
reveal_ratenumber-Characters per second entering the reveal (anime.js default 60)
seednumber-The same scramble on every load
delaynumber0ms before it starts
loopboolean / numberfalseDecode again on every loop
LCARDS

Loading live preview…

text-scramble ​

The same decode as text-decode under its original name, with its original timing keys. Each character scrambles for duration, and characters start stagger ms apart, so a line takes duration + (characters - 1) × stagger ms.

  • Every text-decode key works here too (from, cursor, perturbation, reveal_rate, seed, ...).
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO SCRAMBLE
    show: true
animations:
  - trigger: on_tap
    preset: text-scramble
    params:
      stagger: 30
KeyTypeDefaultDescription
durationnumber800ms each character spends scrambling
staggernumber40ms between characters starting
charactersstringA-Z0-9!@#$%^&*Scramble glyphs, as text-decode's chars (chars works too)
delaynumber0ms before it starts
loopboolean / numberfalseScramble again on every loop
settle_atnumber-Deprecated and no longer used: the decode settles each character itself
LCARDS

Loading live preview…

text-glitch ​

Characters jitter out of place for a glitch or malfunction effect.

  • The easing is always inOutQuad; an ease you set is not used.
  • color_shift works on HTML text only (a data grid's cells); a card's SVG text ignores it.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: SUBSPACE INTERFERENCE
    show: true
animations:
  - trigger: on_load
    preset: text-glitch
    target: "[data-field-id='name']"
    loop: true
    params:
      intensity: 3
KeyTypeDefaultDescription
intensitynumber5Largest displacement, px or SVG units
durationnumber300ms per glitch
staggernumber50ms between characters
color_shiftbooleanfalseAlso shift each character's hue (HTML text only)
seednumber-The same jitter on every load
loopboolean / numberfalseLoop forever, or a number of extra plays
LCARDS

Loading live preview…

text-typewriter ​

Characters appear one at a time at a steady speed, like a typed message.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: INCOMING TRANSMISSION
    show: true
animations:
  - trigger: on_load
    preset: text-typewriter
    target: "[data-field-id='name']"
  - trigger: on_tap
    preset: text-typewriter
    target: "[data-field-id='name']"
KeyTypeDefaultDescription
speednumber100ms per character
loopboolean / numberfalseLoop forever, or a number of extra plays
LCARDS

Loading live preview…


Visual Effect Presets ​

Presets for shimmer, flicker, ripple and glitch effects.

shimmer ​

Fades the target's opacity and, optionally, its colour, back and forth.

  • The colour animates only when both color_from and color_to are set; otherwise only the opacity moves.
  • It animates the CSS color, which shows on HTML text (a data grid's cells), not on a card's SVG shapes.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: SHIMMER
    show: true
animations:
  - trigger: on_load
    preset: shimmer
    params:
      opacity_to: 0.6
KeyTypeDefaultDescription
color_fromcolour-Start colour
color_tocolour-End colour (alias shimmer_color)
opacity_fromnumber1Start opacity
opacity_tonumber0.5End opacity
durationnumber1500ms each way
easestringinOutSineEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
alternatebooleantruePlay back the other way on each loop
shimmer

Loading live preview…

flicker ​

A random opacity flicker, like a failing panel light.

  • Each loop draws a new random pattern, unless seed fixes it. Targets with the same seed flicker the same way.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: FLICKER
    show: true
animations:
  - trigger: on_load
    preset: flicker
KeyTypeDefaultDescription
max_opacitynumber1Brightest opacity, and where it ends
min_opacitynumber0.3Dimmest opacity
durationnumber1000ms per flicker pattern
easestringlinearEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
seednumber-The same random pattern on every load
flicker

Loading live preview…

cascade ​

One property animated across several targets, each starting a little after the last. Aim it at a group with target, such as a data grid's cells.

yaml
type: custom:lcards-data-grid
data_mode: decorative
grid:
  grid-template-columns: repeat(8, 1fr)
  grid-template-rows: repeat(4, auto)
animations:
  - trigger: on_load
    preset: cascade
    target: .grid-cell
    params:
      stagger: 40
KeyTypeDefaultDescription
staggernumber100ms between one target and the next
propertystringopacityThe property to animate
fromnumber0Start value
tonumber1End value
durationnumber1000ms per target
easestringoutExpoEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
●
●
●
●
●
●
●
●

Loading live preview…

ripple ​

The target grows and fades out, like a ripple spreading.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO RIPPLE
    show: true
animations:
  - trigger: on_tap
    preset: ripple
    loop: 1
    alternate: true
    params:
      scale_max: 1.2
      opacity_min: 0.3
KeyTypeDefaultDescription
scale_maxnumber1.5End scale
opacity_minnumber0End opacity
durationnumber1000ms
easestringoutExpoEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
ripple

Loading live preview…

glitch ​

Random jumps in position and hue for a malfunction effect.

  • The easing is always linear; an ease you set is not used.
  • Each loop draws a new random pattern, unless seed fixes it. Targets with the same seed glitch the same way.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO GLITCH
    show: true
animations:
  - trigger: on_tap
    preset: glitch
KeyTypeDefaultDescription
intensitynumber5Largest displacement, px
frequencynumber10Number of glitch steps
durationnumber1000ms
loopboolean / numberfalseLoop forever, or a number of extra plays
seednumber-The same random pattern on every load
glitch

Loading live preview…


Color Animation Presets ​

Presets that animate a colour. On a card's SVG shapes animate fill or stroke; the CSS color shows only on HTML text such as a data grid's cells.

color-shift ​

Animates one colour property from one colour to another.

  • On a card, aim it at the shape with target: without one it runs on the card's outer element, where fill changes nothing. A button's shape is .button-bg (a rect, or a path when the corners differ).
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO SHIFT
    show: true
animations:
  - trigger: on_tap
    preset: color-shift
    target: .button-bg
    loop: 1
    alternate: true
    params:
      property: fill
      color_from: var(--lcars-orange)
      color_to: var(--lcars-blue)
      duration: 600
KeyTypeDefaultDescription
color_fromcolourrequiredStart colour; without it (or color_to) nothing animates
color_tocolourrequiredEnd colour
propertystringcolorfill or stroke for a card's SVG shapes; color or background-color for HTML targets
durationnumber1000ms
easestringinOutQuadEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
color-shift

Loading live preview…

cascade-color ​

The LCARS colour cascade: the target holds one colour, snaps to a second and flashes a third, then repeats. It is made for a data grid's cells, where the card runs it row by row (data grid cascade), with params.pattern for the row timing.

  • The default property is color, which suits a data grid's HTML cells; on a card's SVG shapes set fill or stroke.
  • One cascade-color on a whole set of targets changes them all together. The row-by-row waterfall comes from one animation per row, each with its own delay and duration, which the data grid sets up for you.
yaml
type: custom:lcards-data-grid
data_mode: decorative
grid:
  grid-template-columns: repeat(8, 1fr)
  grid-template-rows: repeat(4, auto)
animations:
  - trigger: on_load
    preset: cascade-color
More about cascade-color
  • The cycle: the first colour holds for 75% of duration, the second for about 15%, and the third shows for the last 10%.
  • mode: both modes run on anime.js; animejs adds the per-target stagger (stagger_from, stagger_delay, axis) and the hover pause (interactive). Setting interactive, stagger_from or an axis other than row switches to animejs even when mode says css. The animation editor doesn't show mode; set it in YAML.
  • delay: one start offset for the whole cascade, not a step between targets (that is stagger_delay).
  • axis without stagger_from has no effect.
  • The data grid's keys: pattern, speed_multiplier and timing are read by the data grid card, not by this preset; see the data grid cascade.
  • The playground below sets stagger_from so a single animation shows a stagger; that isn't the preset's default.
KeyTypeDefaultDescription
colorslistthe theme's cascade coloursThree colours: [start, mid, end]; extra entries are ignored
propertystringcolorThe property to animate
modestringcsscss or animejs; see the details above
durationnumber5000ms per full cycle
easestringlinearEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
alternatebooleantruePlay back the other way on each loop
delaynumber0ms before the whole cascade starts
stagger_delaynumber100ms between targets, animejs mode only
stagger_fromstring-Where the stagger starts: first, last, center or random
axisstringrowWith stagger_from: row follows the order of the targets; column staggers by layout position, row by row downward
interactivebooleanfalsePause on hover and resume on leave; with stagger_from, hovering any target pauses the whole cascade
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●

Loading live preview…


SVG-Specific Presets ​

Presets that need an SVG shape or line: drawing it in, marching its dashes, morphing it or moving along it. An MSD card's lines and shapes are the natural place, so the examples here use one.

draw ​

Draws a line or outline in from one end, as if a pen traced it. Put it on an MSD line or shape, or aim it at an SVG path.

  • It animates the stroke only; a filled shape keeps its fill.
yaml
type: custom:lcards-msd-card
msd:
  view_box: [0, 0, 400, 160]
  overlays:
    - id: conduit
      type: line
      anchor: [40, 40]
      attach_to: [360, 120]
      style:
        color: var(--lcars-orange)
        width: 6
      animations:
        - trigger: on_load
          preset: draw
          loop: true
          alternate: true
KeyTypeDefaultDescription
reversebooleanfalseDraw from the other end
drawlist['0 0', '0 1']anime.js draw values [start, end], each the visible start and end as fractions of the length; wins over reverse
durationnumber2000ms
easestringinOutSineEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop

Loading live preview…

march ​

Dashes march along a line, like power flowing through a conduit. It runs as a CSS animation rather than anime.js, so it costs little to leave running.

  • A line with its own dash_array keeps its dashes, and the march follows the whole pattern.
yaml
type: custom:lcards-msd-card
msd:
  view_box: [0, 0, 400, 160]
  overlays:
    - id: power_feed
      type: line
      anchor: [40, 40]
      attach_to: [360, 120]
      style:
        color: var(--lcars-blue)
        width: 6
        dash_array: [14, 8]
      animations:
        - trigger: on_load
          preset: march
KeyTypeDefaultDescription
dash_lengthnumber10Dash length; read from the line's own dashes when it has them
gap_lengthnumber5Gap length; read from the line's own dashes when it has them
speednumber2Seconds per cycle. Without it, duration (ms) sets the cycle; speed wins when both are set
directionstringforwardforward or reverse
loopboolean / numbertruetrue marches forever, false plays once, a number plays that many times

Loading live preview…

morph ​

One SVG shape becomes another, with anime.js's morphTo. For example, a status indicator that turns into a warning sign while an alert is on.

  • The animated shape is the target, or the first path inside it, so an MSD shape or line overlay works. to names the shape it becomes, anywhere in the same card; that shape can be hidden.
  • Both shapes must be a <path>, <polygon> or <polyline>: on an MSD that is a kind: polyline shape or a line. rect and circle shapes draw native rectangles and ellipses, which don't morph.
  • Stopping puts the original shape back, and loop with alternate flips between the two.
yaml
type: custom:lcards-msd-card
msd:
  base_svg:
    source: none
  view_box: [0, 0, 400, 200]
  overlays:
    - id: status_shape
      type: shape
      kind: polyline
      closed: true
      points:
        - [150, 40]
        - [250, 40]
        - [250, 140]
        - [150, 140]
      corner_style: miter
      style:
        color: var(--lcars-orange)
        fill: var(--lcars-orange)
      animations:
        - trigger: on_load
          preset: morph
          loop: true
          alternate: true
          params:
            to: '[data-overlay-id="warn_shape"]'
            duration: 1200
    - id: warn_shape
      type: shape
      kind: polyline
      closed: true
      points:
        - [200, 40]
        - [250, 140]
        - [150, 140]
      corner_style: miter
      style:
        color: transparent
        fill: transparent
KeyTypeDefaultDescription
tostringrequiredCSS selector of the shape to become, e.g. [data-overlay-id="warn_shape"] (older name morph_to_selector)
precisionnumber0.33Points sampled per SVG unit of length; higher is smoother. 0 interpolates the raw geometry, which works only when both shapes use the same path commands
durationnumber800ms
easestringinOutQuadEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalseMorph back on each loop

Stagger Presets ​

Presets that animate a group of targets, each one starting a step later than the one before. They use anime.js's stagger(), so they need several elements matched by target or targets; on a single element there is no visible stagger.

  • In these presets delay is the step between targets, not one start offset for the animation.
  • stagger-grid is not the removed grid-stagger; to move an old grid-stagger config across, see grid-stagger (removed).

stagger-grid ​

A wave across a grid of targets, from a corner, the centre, the edges or a cell you pick. Give the grid's size in grid as [cols, rows].

yaml
type: custom:lcards-data-grid
data_mode: decorative
grid:
  grid-template-columns: repeat(8, 1fr)
  grid-template-rows: repeat(4, auto)
animations:
  - trigger: on_tap
    preset: stagger-grid
    target: .grid-cell
    params:
      grid: [8, 4]
      from: center
      delay: 50
KeyTypeDefaultDescription
gridlist[1, 1]Grid size [cols, rows]; a value of another shape logs a warning and nothing animates
fromstring / listfirstWave origin: first (top-left), last, center (outward), edges (inward), random, pointer (where the card was tapped, see tap-ripple), or a [col, row] cell counted from 0. start and end are aliases of first and last
axisstring-Stagger along one axis only: x (or row) delays by column, y (or column) by row
delaynumber100ms between one target and the next
reversedbooleanfalseRun the stagger in the opposite order
jitternumber / list-Random ms added to or taken from each target's delay; [start, end] ramps it along the stagger order
seednumber-The same jitter and random order on every load
propertystringscaleThe property to animate
from_valuenumber0.8Start value
to_valuenumber1End value
durationnumber600ms per target
easestringoutQuadEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
●
●
●
●
●
●
●
●
●
●
●
●

Loading live preview…

stagger-wave ​

A wave rolls through a row of targets: each one lifts and drops back in turn.

yaml
type: custom:lcards-data-grid
data_mode: decorative
grid:
  grid-template-columns: repeat(10, 1fr)
  grid-template-rows: repeat(2, auto)
animations:
  - trigger: on_tap
    preset: stagger-wave
    target: .grid-cell
    params:
      delay: 60
      amplitude: -12
KeyTypeDefaultDescription
delaynumber100ms between one target and the next
reversedbooleanfalseRun the wave from the last target
directionstringnormalreverse is the same as reversed: true
jitternumber / list-Random ms added to or taken from each target's delay; [start, end] ramps it along the stagger order
seednumber-The same jitter on every load
propertystringtranslateYThe property to animate
amplitudenumber-20Peak displacement: each target goes 0, then amplitude, then back to 0
durationnumber800ms per target
easestringoutElasticEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalsePlay back the other way on each loop
●
●
●
●
●
●
●
●

Loading live preview…

stagger-radial ​

A stagger that spreads outward from a point, measured on where the targets really are. Use it for a ripple across a group, from the centre, a corner or the tap.

yaml
type: custom:lcards-data-grid
data_mode: decorative
grid:
  grid-template-columns: repeat(8, 1fr)
  grid-template-rows: repeat(4, auto)
animations:
  # from the top-left corner, with a little random spread that is the same on every load
  - trigger: on_tap
    preset: stagger-radial
    target: .grid-cell
    params:
      from: [0, 0]
      delay: 40
      jitter: 25
      seed: 7
      property: opacity
KeyTypeDefaultDescription
fromstring / listcenterWhere the ripple starts: center, first, last, random, pointer (where the card was tapped, see tap-ripple), or an [x, y] point as fractions of the group (0 to 1, [0, 0] is top-left)
reversedbooleanfalseRun the stagger in the opposite order
jitternumber / list-Random ms added to or taken from each target's delay; [start, end] ramps it along the stagger order
seednumber-The same jitter and random order on every load
delaynumber50ms between one ring of targets and the next
propertystringscaleThe property to animate
from_valuenumber0Start value
to_valuenumber1End value
durationnumber800ms per target
easestringoutExpoEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●

Loading live preview…

stagger-flash ​

A bright colour sweeps across the targets and leaves a dim one behind, like an LCARS alert bar. It runs on the browser's own animations rather than anime.js, and each target loops on its own.

  • The default property is stroke, for SVG lines and outlines; for HTML text such as a data grid's cells, set color.
yaml
type: custom:lcards-data-grid
data_mode: decorative
grid:
  grid-template-columns: repeat(10, 1fr)
  grid-template-rows: repeat(1, auto)
animations:
  - trigger: on_load
    preset: stagger-flash
    target: .grid-cell
    params:
      property: color
      lead_color: var(--lcars-orange)
      trail_color: var(--lcars-blue)
KeyTypeDefaultDescription
lead_colorcolourvar(--primary-color)Colour at the front of the sweep
trail_colorcolour#444444Colour left behind
lead_pctnumber20Share of each cycle spent going from the lead colour to the trail colour, percent (1 to 50)
durationnumber2000ms per cycle
delaynumberduration / 12ms between one target and the next
fromstringfirstfirst, last or center
propertystringstrokeThe property to animate
with_opacitybooleantrueAlso dim the opacity as the sweep passes
trail_opacitynumber0.25Opacity left behind, with with_opacity
loopbooleantruetrue (or any number) sweeps forever; false sweeps once
gridlist-[cols, rows]; accepted but has no effect on the sweep order
●
●
●
●
●
●
●
●

Loading live preview…


tap-ripple ​

A pulse spreads across a group of targets from where the card was tapped. Each target scales up, dims (and optionally flashes a colour) and settles back, later the further it is from the tap.

  • Positions are read from the layout, so it works on data grid cells without a grid size.
  • Use it on on_tap (also on_hold or on_double_tap); any other trigger starts it from the centre. On a data grid, a tap anywhere on the grid fires the card's on_tap animations, alongside any cell actions.
  • from: pointer works on stagger-grid and stagger-radial too, for any stagger that should start at the tap.
yaml
type: custom:lcards-data-grid
data_mode: decorative
grid:
  grid-template-columns: repeat(8, 1fr)
  grid-template-rows: repeat(4, auto)
animations:
  - trigger: on_tap
    preset: tap-ripple
    target: .grid-cell
    params:
      color: var(--lcars-orange)
      jitter: 30
KeyTypeDefaultDescription
spreadnumber400ms for the wave to reach the farthest target, whatever the layout
scalenumber1.08Peak scale of each target
opacity_minnumber0.4Lowest opacity of each target during its pulse
colorcolour-Flash colour at the peak of each pulse (theme token, CSS variable or colour)
propertystringcolorWhat color sets: color for HTML text such as data grid cells, fill or stroke for SVG shapes
fromstringpointerWhere the wave starts: pointer, center, first, last or random
reversedbooleanfalseRun the wave inward, ending at the tap point
jitternumber / list-Random extra delay per target (ms, or a [start, end] ramp) for a less even wave
seednumber-The same jitter on every load
gridlist-[cols, rows] to measure by grid cell instead of by layout position
durationnumber500ms of one target's pulse
easestringoutQuadEasing

Timeline Presets ​

Animations of several steps on one anime.js timeline. Each step sets its own timing and easing, so the top-level duration and ease do nothing here. loop, alternate and delay apply to the whole timeline: repeat it, play it back, or wait before it starts.

timeline-cascade ​

A timeline of steps you write yourself, each animating any part of the card.

  • A step without targets animates the animation's own target.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO RUN
    show: true
animations:
  - trigger: on_tap
    preset: timeline-cascade
    params:
      steps:
        # the shape dims and comes back
        - targets: .button-bg
          params:
            opacity: [1, 0.3, 1]
          duration: 600
        # then the label grows and settles
        - targets: "[data-field-id='name']"
          params:
            scale: [1, 1.2, 1]
          duration: 400
KeyTypeDefaultDescription
stepslistrequiredThe steps, at least one
steps[].targetsstringthe animation's targetCSS selector inside the card
steps[].paramsobject-anime.js properties for the step, such as scale or opacity with [from, to] values
steps[].durationnumber-ms
steps[].offsetnumber / stringafter the previous stepWhen the step starts; see step positions
loopboolean / numberfalseLoop the whole timeline
timeline-cascade

Loading live preview…

timeline-attention ​

A fixed three-part "look at me": the target grows, shakes, then settles back.

yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP FOR ATTENTION
    show: true
animations:
  - trigger: on_tap
    preset: timeline-attention
KeyTypeDefaultDescription
scale_maxnumber1.15Peak scale in the first part
shake_intensitynumber5Largest sideways displacement in the shake, px
duration_scalenumber200ms to grow
duration_shakenumber300ms to shake
duration_settlenumber400ms to settle back
loopboolean / numberfalseLoop the whole sequence
timeline-attention

Loading live preview…


Effect Presets ​

Effects with several parts on one timeline. Each is one tracked animation: stopping it, or reduced motion, leaves the card as it was.

boot-sequence ​

The card powers up: stroked shapes draw in, filled shapes come on, then the text decodes from glyph noise (text-decode). Best on on_show (each time the card appears) or on_load.

  • It works on whatever the target has, so a lozenge without a border skips the draw and an elbow without text skips the decode.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: WARP CORE
    show: true
animations:
  - trigger: on_show
    preset: boot-sequence
    params:
      fill: sweep
  - trigger: on_tap
    preset: boot-sequence
    params:
      fill: sweep
KeyTypeDefaultDescription
durationnumber1200ms for the whole sequence
fillstringflickerHow filled shapes come on: flicker (a panel powering up), sweep (wipes in from the from side) or fade
fromstringleftThe side a sweep starts from: left, right, top or bottom
drawbooleantrueDraw stroked shapes in
decodebooleantrueDecode the text; with false the text just appears
charsstringA-Z0-9Decode glyphs, as in text-decode
staggernumber60ms between one shape coming on and the next
seednumber-The same decode on every load
delaynumber0ms before it starts

sensor-sweep ​

A rotating scanner wedge with a ring that pings outward on each turn. It draws its own shapes, centred on the target (or on center), and removes them when it stops; nothing in the card changes.

  • On an elbow or an MSD, set center and radius to put it on a corner or a spot of the ship.
yaml
type: custom:lcards-msd-card
msd:
  base_svg:
    source: none
  view_box: [0, 0, 400, 200]
  overlays:
    - id: scanner
      type: shape
      kind: circle
      position: [130, 30]
      size: [140, 140]
      style:
        color: var(--lcars-blue)
        width: 2
      animations:
        - trigger: on_load
          preset: sensor-sweep
          params:
            color: var(--lcars-orange)
KeyTypeDefaultDescription
durationnumber3000ms per turn (and per ping)
radiusnumberhalf the shorter sideSVG units
centerlistthe target's centre[x, y] in the target's SVG units
anglenumber40Wedge width, degrees (1 to 359)
directionstringcwcw or ccw
colorcolourtheme:colors.ui.primaryWedge colour
ring_colorcolourcolorPing ring colour
opacitynumber0.35Wedge opacity; the ring starts at 2.5 times this (at most 1) and fades out
ringbooleantrueShow the ping ring
ring_widthnumber2Ring stroke width, SVG units
delaynumber0ms before it starts
loopboolean / numbertrueKeep sweeping

Utility Presets ​

Presets for setting values at once, writing raw anime.js, and moving along a path.

set ​

Sets properties at once, without animating. Use it to put a target in its starting state before other animations run.

  • duration is always 0, so ease does nothing. A delay still waits before the properties are set.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: DIMMED
    show: true
animations:
  - trigger: on_load
    preset: set
    target: .button-bg
    params:
      properties:
        opacity: 0.5
        fill: var(--lcars-red)
KeyTypeDefaultDescription
propertiesobject{}The properties to set, such as opacity or fill
set

Loading live preview…

custom ​

Raw anime.js v4 animation properties, passed straight to animate(): anything a preset doesn't cover. params holds the properties; the element comes from the animation's own target or targets (a targets key inside params is ignored).

  • Colours (theme tokens, CSS variables) are resolved and the reduced-motion gate applies, as for every preset. The animation editor's Use custom anime.js code switch writes this shape.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO WOBBLE
    show: true
animations:
  - trigger: on_tap
    preset: custom
    params:
      scale: [1, 1.08, 1]
      rotate: [0, 3, -3, 0]
      duration: 600
      ease: outQuad
More about custom
  • What YAML can't do: function values and callbacks can't be written in YAML, so stagger, onComplete and the like aren't available here; use a stagger preset or sequence for those.
  • Older configs: configs from older editors (type: custom with an animejs: block) still run, but the config checker reports them (they have no preset). The editor rewrites them to preset: custom when you edit them, or change them by hand.
KeyTypeDefaultDescription
any anime.js v4 property--opacity, scale, translateX, rotate, fill, keyframes, ... with anime.js v4 values ([from, to], keyframe lists, '+=10')
durationnumber1000ms (anime.js's default)
easestringout(2)Easing (anime.js's default), with the same names as every preset (outQuad, inOutSine, ...)
loopboolean / numberfalseAs in anime.js
alternatebooleanfalseAs in anime.js
delaynumber0As in anime.js

motionpath ​

Moves something along the route of an SVG line or shape, with anime.js v4's createMotionPath(). It works in two ways:

  • Move an element: set target or targets to the element that travels, and params.path to a different element that is the route (a line's id, for example). Pointing path at the element being animated logs a warning and does nothing.
  • A tracer: set params.shape and leave out target; the preset makes a small dot, square or diamond and moves it along path, for energy flowing along a line. It can sit on the line's own animations, with path naming that line. If shape and a target are both set, shape wins (with a warning).
yaml
type: custom:lcards-msd-card
msd:
  view_box: [0, 0, 400, 160]
  overlays:
    - id: route
      type: line
      anchor: [40, 40]
      attach_to: [360, 120]
      style:
        color: var(--lcars-blue)
        width: 4
      animations:
        # a dot travels the line and back
        - trigger: on_load
          preset: motionpath
          duration: 3000
          loop: true
          alternate: true
          params:
            path: "#route"
            shape:
              type: circle
              size: 14
              fill: var(--lcars-orange)
More about motionpath
  • The route: path is looked up inside the card when it starts with # or .. It can be any SVG geometry (path, circle, rect, ellipse, line, polyline, polygon); when it names a wrapper group instead (such as an MSD line's <g id="...">), the drawn geometry inside it is used.
  • Moving a control along a line: target: "#my-control-id" with params.path: "#line_2" moves the control and leaves the line as it is.
  • The shape keys mirror line markers' (marker_start, marker_end) styling.
KeyTypeDefaultDescription
pathstringrequiredCSS selector (#id or .class) of the route
durationnumber4000ms for one pass along the path
easestringlinearEasing
loopboolean / numberfalseLoop forever, or a number of extra plays
alternatebooleanfalseTravel back on each loop
rotatebooleantrueTurn the element or shape to face the way it travels
anchorstring50% 50%CSS transform-origin: the point it turns round
shape.typestringcircleTracer shape: circle, rect or diamond
shape.sizenumber10Diameter (circle, diamond), or width and height (rect), px
shape.widthnumbershape.sizerect only: width
shape.heightnumbershape.sizerect only: height
shape.fillcolourcurrentColorFill colour
shape.strokecolournoneStroke colour
shape.stroke_widthnumber0Stroke width, px

Loading live preview…


Advanced Presets ​

Timelines of raw steps, random motion and spring physics.

sequence ​

A timeline of steps, each with its own anime.js properties, target and start time. One sequence can move between parts of a card: draw a line, then light a control, then fade in a label.

  • Each step can name its own target, a CSS selector resolved inside the card; without one, a step animates the animation's own target. In an MSD card the selector reaches every overlay of the card, for example [data-overlay-id="line_1"].
  • The whole sequence is one timeline, however many elements it animates.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO REPLAY
    show: true
animations:
  # the fill fades in, then the label
  - trigger: on_show
    preset: sequence
    params:
      steps:
        - target: .button-bg
          opacity: [0, 1]
          duration: 400
        - target: "[data-field-id='name']"
          opacity: [0, 1]
          duration: 300
          offset: "-=150"
  - trigger: on_tap
    preset: sequence
    params:
      steps:
        - target: .button-bg
          opacity: [0, 1]
          duration: 400
        - target: "[data-field-id='name']"
          opacity: [0, 1]
          duration: 300
          offset: "-=150"

Step positions (offset):

ValueStarts
(none)When the previous step ends
500At 500 ms from the start of the sequence
'+=200' / '-=200'200 ms after / before the previous step ends
'<'When the previous step ends
'<<'Together with the previous step
More about sequence
  • at: an older name for offset, still accepted; offset wins when a step sets both.
KeyTypeDefaultDescription
stepslistrequiredThe steps, at least one; each takes the properties of an anime.js animate() call
steps[].targetstringthe animation's targetCSS selector inside the card
steps[].offsetnumber / stringafter the previous stepWhen the step starts; see the step positions above
steps[].durationnumberthe sequence's durationms
steps[].easestringthe sequence's easeEasing
durationnumber2000ms of a step that doesn't set its own
easestringoutQuadEasing of a step that doesn't set its own
loopboolean / numberfalseLoop the whole sequence
sequence

Loading live preview…

grid-stagger (removed in 2026.07.x) ​

grid-stagger was removed in 2026.07.x; use stagger-grid instead. It never staggered: every element got the same timing whatever the config. preset: grid-stagger in an existing config no longer runs.

  • The move to stagger-grid is not a plain rename; the table below maps the keys. See the 2026.07.x release notes for the full entry.

Removed: migrate to stagger-grid

grid-stagger keystagger-grid equivalentNotes
stagger_durationdelayRenamed: stagger-grid uses delay for the step between elements
wave_durationdurationRenamed: stagger-grid does read duration
from: centerfrom: centerSame
from: firstfrom: startRenamed value
from: lastfrom: endRenamed value
from: random-No equivalent
-from: edgesstagger-grid only
grid, property, from_value, to_value, loop, alternatesame namesThe names match, but the defaults differ

chaos ​

Random motion on several properties at once, for error states and malfunction effects. Each loop moves to new random values.

  • The top-level duration isn't used: each move takes a random time between duration_min and duration_max.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: CONTAINMENT FAILING
    show: true
animations:
  - trigger: on_load
    preset: chaos
    params:
      range:
        x: [-6, 6]
        "y": [-3, 3]
        rotate: [-2, 2]
KeyTypeDefaultDescription
propertieslist['x', 'y', 'rotate']Properties to randomise; x and y are translateX and translateY
rangeobject-[min, max] per property; keys you leave out keep their defaults
range.xlist[-50, 50]px
range.ylist[-50, 50]px
range.rotatelist[-15, 15]Degrees
duration_minnumber200Shortest move, ms
duration_maxnumber800Longest move, ms
compositionstringblendblend or replace
easestringinOutQuadEasing
loopboolean / numbertrueLoop forever, or a number of extra plays
seednumber-The same random motion on every load; targets with the same seed move the same way
chaos

Loading live preview…

physics-spring ​

A spring-physics animation: the value overshoots and settles like a real spring. It gives more natural motion than an easing curve.

  • The spring sets the easing and the length of the animation, so ease and duration aren't used.
yaml
type: custom:lcards-button
preset: lozenge
tap_action:
  action: none
text:
  name:
    content: TAP TO SPRING
    show: true
animations:
  - trigger: on_tap
    preset: physics-spring
    params:
      from: 0.9
      to: 1
      damping: 6
KeyTypeDefaultDescription
propertystringscaleThe property to animate
fromnumber / stringrequiredStart value (a colour string works for a colour property)
tonumber / stringrequiredEnd value
stiffnessnumber100Higher is snappier
dampingnumber10Higher bounces less
massnumber1Higher is slower
velocitynumber0Starting velocity
loopboolean / numberfalseLoop forever, or a number of extra plays
physics-spring

Loading live preview…


See Also ​

Released under the MIT License. | About