Components
HeroUI v3 Switch — toggle with sizes, label position, icons, descriptions, disabled/selected states, groups, render props and custom styles.
npx shadcn@latest add https://21st.dev/r/hero_ui/heroui-switchLoading preview...
import { Switch, Description } from "@/components/ui/heroui-switch"
export default function WithDescription() {
return (
<div className="max-w-sm">
<Switch>
<Switch.Content>
<Switch.Control>
<Switch.Thumb />
</Switch.Control>
Public profile
</Switch.Content>
<Description>Allow others to see your profile information</Description>
</Switch>
</div>
)
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...