Abraham

Toggle Basic

Buttons 8

About

Here is Toggle component

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Toggle Basic to your project and fits it to your theme.

Code

How Toggle Basic is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { Toggle } from "@ark-ui/react/toggle";
import { Heart } from "lucide-react";

export default function ToggleGhost() {
  return (
    <div className="bg-white dark:bg-gray-800 w-full px-4 py-12 rounded-xl flex flex-col items-center">
      <Toggle.Root className="inline-flex items-center justify-center gap-2 px-4 py-2 rounded-md text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 data-[state=on]:bg-red-100 dark:data-[state=on]:bg-red-900/20 data-[state=on]:text-red-700 dark:data-[state=on]:text-red-300 transition-all text-sm font-medium">
        <Heart className="w-4 h-4" />
        Like
      </Toggle.Root>
    </div>
  );
}

Dependencies

More by Abraham

View all
  • Signature Pad

    Signature Pad

    115
  • Carousel

    Carousel

    85
  • timeline-animation

    timeline-animation

    69
  • Basic Toast

    Basic Toast

    60
  • Calendar

    Calendar

    58
  • QR Code

    QR Code

    54
  •  Menu

    Menu

    53
  • Steps

    Steps

    51

More in Buttons

View all
  • Hero Button

    Hero Button

    21
  • Button

    Button

    141
  • Eclipse Button

    Eclipse Button

    9
  • Button

    Button

    19
  • Texture Button

    Texture Button

    110
  • Random Letter Swap CTA Buttons

    Random Letter Swap CTA Buttons

    64
  • HeroUI Toggle Button

    HeroUI Toggle Button

  • Icon Label Subtext Button

    Icon Label Subtext Button

    65