PhoenixDuskmoon.Component.Fun.PlasmaBall (PhoenixDuskmoon v7.2.1)
View SourceInteractive 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 classesphx_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
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 totrue.class(:string) - Defaults tonil.phx_target(:any) - Defaults tonil.- Global attributes are accepted.