erictsai83

Floating Select

Buttons

About

A single-button floating select that expands into an animated option list.

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

Code

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

Usage.tsx

"use client";

import { useState } from "react";

import { FloatingSelect } from "@/components/ui/ericts-floating-select";

const floatingSelectOptions = [
  {
    value: "command",
    label: "Command",
  },
  {
    value: "design",
    label: "Design",
  },
  {
    value: "review",
    label: "Review",
  },
];

export default function Preview() {
  const [value, setValue] = useState(floatingSelectOptions[0].value);

  return (
    <div className="flex min-h-48 w-full items-center justify-center">
      <FloatingSelect
        placement="inline"
        label="Mode"
        value={value}
        onValueChange={setValue}
        options={floatingSelectOptions}
      />
    </div>
  );
}

Dependencies

More by erictsai83

View all
  • Adaptive Drawer

    Adaptive Drawer

  • Status Button

    Status Button

  • Floating Shortcut Button

    Floating Shortcut Button

  • Filter Tags

    Filter Tags

  • Feedback Popover

    Feedback Popover

  • Expandable Toolbar

    Expandable Toolbar

  • Expandable Toggle Button

    Expandable Toggle Button

  • Arc Menu

    Arc Menu

More in Buttons

View all
  • Button

    Button

    166
  • Texture Button

    Texture Button

    121
  • Button

    Button

    21
  • Figma File Button

    Figma File Button

    39
  • Native Button

    Native Button

    12
  • Button

    Button

    88
  • HeroUI Button Group

    HeroUI Button Group

    11
  • Great UI Button

    Great UI Button

    19