Raxol.Effects.BorderBeam.CSS (Raxol v2.6.0)

View Source

LiveView CSS generation for the BorderBeam effect.

Produces CSS that mirrors the original border-beam React component: conic-gradient beam stroke masked to the border, inner glow with blur, outer bloom with extended blur, and hue-rotate animation.

Summary

Functions

Generates a CSS style block for the border beam effect on the given element.

Returns an animation hint map for the border beam effect, suitable for inclusion in element animation_hints.

Functions

to_css(config, element_id)

@spec to_css(map(), String.t()) :: String.t()

Generates a CSS style block for the border beam effect on the given element.

The element must have data-raxol-id="{element_id}" in the HTML.

to_hint(config)

@spec to_hint(map()) :: %{
  type: :border_beam,
  variant: atom(),
  size: atom(),
  strength: float(),
  duration_ms: pos_integer(),
  brightness: float(),
  saturation: float(),
  hue_range: non_neg_integer(),
  active: boolean(),
  static_colors: boolean()
}

Returns an animation hint map for the border beam effect, suitable for inclusion in element animation_hints.