ToggleSwitch
The ToggleSwitch component is an interactive UI element that allows users to switch between two states, usually 'on' or 'off'. It’s a more visual and often more user-friendly alternative to checkboxes for binary settings. ToggleSwitches are commonly found in settings pages, where they control features like dark mode, notifications, or privacy options. Their intuitive design makes them ideal for quick, on-the-fly adjustments in user preferences.
Code
import ToggleSwitch from "@lumina-design/core/ToggleSwitch"; <ToggleSwitch id="newsletter" className="newsletter" checked={switchFlag} onChange={(flag) => toggleSwitchFlag(flag)} optionLabels={["Yes", "No"]} />