Elemental.Actions.Swap (elemental v0.3.2)
A simple swap component.
Allows for alternative between two HTML elements (or subtrees) when clicked. Comprised of an underlying checkbox to control the state of the which element to show.
Usage
<.swap>
<:on>ON</:on>
<:off>OFF</:off>
</.swap>
Summary
Functions
The primary swap component.
Functions
The primary swap component.
Attributes
animate(:string) - Control the animation to use when doing the swap. Defaults to"default".- Global attributes are accepted.
Slots
on(required) - The requiredonstate content.off(required) - The requiredoffstate content.If
indeterminateslot is not given this will be the default state the component starts in.indeterminate- An optionalindeterminatestate content.If given the inner checkbox be immediately set to
indeterminateonce it first mounts.