Swap 调换

使用 Swap,你可以使用复选框或类名来切换两个元素的显示。

类名
类型
swap 组件类 Container element
swap-on 组件类 The child element that should be visible when checkbox is checked or when swap is active
swap-off 组件类 The child element that should be visible when checkbox is not checked or when swap is not active
swap-indeterminate 组件类 The child element that should be visible when checkbox is indeterminate
swap-active
装饰类
Activates the swap (no need for checkbox)
swap-rotate
装饰类
Adds rotate effect to swap
swap-flip
装饰类
Adds flip effect to swap
# Swap text
# Swap volume icons
# Swap icons with rotate effect
# Hamburger button
# Swap icons with flip effect
# Activate using class name instead of checkbox
Instead of working with click, it shows swap-on item if you add swap-active class name. You can add or remove swap-active class using JS
🥵
🥶
🥳
😭
daisyUI store

New template: SaaS Landing page

Available on daisyUI store

More details