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>
);
}















