DaisyUIComponents.Swap (DaisyUIComponents v0.7.6)
View SourceSelect component
Summary
Functions
Render a Swap component
Attributes
class
(:any
) - Defaults tonil
.mode
(:string
) (required) - Must be one of"on"
, or"off"
.name
(:string
) (required)type
(:string
) - Defaults to"label"
.
Functions
Render a Swap component
Examples
<.swap >
<:swap_on name="ON" />
<:swap_off name="OFF" />
</.swap>
with theme controller
<.swap >
<:controller>
<input type="checkbox" class="theme-controller" value="synthwave" />
</:controller>
<:swap_on name="ON" />
<:swap_off name="OFF" />
</.swap>
Attributes
class
(:any
) - Defaults tonil
.animation
(:string
) - Must be one of"flip"
, or"rotate"
.- Global attributes are accepted.
Slots
swap_on
- the child element that should be visible when checkbox is checked or when swap is active. Accepts attributes:type
(:string
) - Must be one of"label"
, or"icon"
.name
(:string
) (required)
swap_off
- The child element that should be visible when checkbox is not checked or when swap is not active. Accepts attributes:type
(:string
) - Must be one of"label"
, or"icon"
.name
(:string
) (required)
controller
- The swap input controller.
Attributes
class
(:any
) - Defaults tonil
.mode
(:string
) (required) - Must be one of"on"
, or"off"
.name
(:string
) (required)type
(:string
) - Defaults to"label"
.