toggle is an animation that can:
The available control components (where the user can click) are:
This effect is also already automatically added:
<toggle light target-id="boxId" toggle-state="expanded">
<expand><icon name="bi:arrows-expand"/> Expand</expand>
<collapse><icon name="bi:arrows-collapse"/> Collapse</collapse>
</toggle>
<box id="boxId" toggle-state="expanded">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
</box>
<text>Lorem Ipsum
<itext id="collapsableTextId" toggle-state="collapsed">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
</itext><toggle link target-id="collapsableTextId" toggle-state="collapsed"><expand>More ...</expand><collapse>< Less</collapse></toggle>
</text>
Lorem Ipsum Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
This animation needs to set attributes:
On the control component (link or button), you give the component id to toggle via the toggleTargetId
<toggle
type="primary|secondary|success|danger|warning|info|light|dark|link"
target-id="component-id-to-toggle"
toggle-state="collapsed|expanded"
>
<collapse>Collapse</collapse>
<expand>Expand</expand>
</toggle>
where:
On the component to toggle
<component id="componentId" toggle-state="collapsed|expanded"></component>
toggle-state allows breakpoint prefix such as
<component toggle-state="collapsed md-expanded" />
The target component will then be: