PhoenixDuskmoon.Component.Fun.PlasmaBall (PhoenixDuskmoon v7.2.1)

View Source

Interactive plasma ball component with animated electricity effects.

Examples

<.dm_fun_plasma_ball
  id="plasma-ball-1"
  size="medium"
  base_color="#222222"
  phx-click="plasma_toggle"
  phx-target={@myself}
/>

<.dm_fun_plasma_ball
  id="plasma-ball-2"
  size="large"
  base_color="#1a1a2e"
  show_electrode={false}
/>

Attributes

  • id - Component ID (required)
  • size - Size preset: small (250px), medium (350px), large (450px) (default: medium)
  • base_color - Base color of the plasma ball (default: "#222222")
  • show_electrode - Show bottom electrode (default: true)
  • class - Additional CSS classes
  • phx_target - LiveView target for events

Styling

This component uses the dm-fun-plasma-ball CSS class from the plasma-ball.css file. It creates an interactive plasma ball with animated electricity effects that respond to hover and click interactions.

Summary

Functions

dm_fun_plasma_ball(assigns)

Attributes

  • id (:string) (required)
  • size (:string) - Defaults to "medium". Must be one of "small", "medium", or "large".
  • base_color (:string) - Defaults to "#222222".
  • show_electrode (:boolean) - Defaults to true.
  • class (:string) - Defaults to nil.
  • phx_target (:any) - Defaults to nil.
  • Global attributes are accepted.