Toggle Button

<ToggleButton> is a button with a sticky on/off state — ideal for toolbar
toggles (bold, italic, …) where the control reflects whether it’s engaged.
import { useState } from "react";import { ToggleButton } from "@huyz0/ztui/react";
function BoldToggle() { const [bold, setBold] = useState(false); return <ToggleButton active={bold} onChange={setBold} label="B" />;}Key props
Section titled “Key props”active/onChange— controlled pressed state.label— button text.onClick— also fired on activation, if you need the raw event.