halaska-studio

Popover

Component

About

A click-triggered floating panel anchored to its trigger button, used to show contextual details, settings, or a quick inline form without navigating away from the page.

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

Code

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

Usage.tsx

"use client";

import Popover from "@/components/ui/popover";
import IconButton from "@/components/ui/popover-utils/icon-button";
import Stack from "@/components/ui/popover-utils/stack";
import Text from "@/components/ui/popover-utils/text";
import SwitchToggle from "@/components/ui/popover-utils/switch-toggle";
import { useState } from "react";

export default function PopoverSettingsDemo() {
  const [drafts, setDrafts] = useState(true);
  const [refunds, setRefunds] = useState(false);
  return (
    <div className="flex items-center justify-center w-full h-full min-h-[320px] p-10">
      <Popover
        trigger={
          <IconButton icon="⚙" label="Alpha settings" variant="secondary" />
        }
      >
        <Stack gap={12} style={{ width: 220 }}>
          <Text weight="medium">Alpha on this inbox</Text>
          <SwitchToggle
            checked={drafts}
            onChange={setDrafts}
            label="Draft replies"
          />
          <SwitchToggle
            checked={refunds}
            onChange={setRefunds}
            label="Issue refunds under $50"
          />
        </Stack>
      </Popover>
    </div>
  );
}

More by halaska-studio

View all
  • Dot Grid

    Dot Grid

    24
  • Orb

    Orb

    15
  • Segmented Control

    Segmented Control

    8
  • Choicebox

    Choicebox

    6
  • Combobox

    Combobox

    5
  • Dialog

    Dialog

    4
  • Input OTP

    Input OTP

    4
  • Table

    Table

    2