Docs

Toggle

Toggle

A two-state button that can be either on or off.

import * as React from "react";
 
import { Toggle } from "@/components/ui/toggle";
import { BoldIcon } from "lucide-react";
 
export function TooltipExample(): React.JSX.Element {
  return (
    <Toggle>
      <BoldIcon />
    </Toggle>
  );
}

Installation

npx lotru@latest add ui/toggle

Usage

import { Toggle } from "@/components/ui/toggle";
<Toggle>Toggle</Toggle>

On this page