# Schedule Demo Form

> A hero with a schedule demo form for name, company, and a time slot. Books sales calls with prospects right where they first arrive.

A shadcn/ui block from the [@shadcn-ui-blocks](https://www.shadcn-ui-blocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcn-ui-blocks/marketing-hero-forms-schedule-demo-form).

- Page, with a live preview: https://shadcn.exchange/r/shadcn-ui-blocks/marketing-hero-forms-schedule-demo-form
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcn-ui-blocks/marketing-hero-forms-schedule-demo-form-light-2bcce120fc7b3607.png
- Registry item: https://www.shadcn-ui-blocks.com/r/marketing-hero-forms-schedule-demo-form.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://www.shadcn-ui-blocks.com/r/marketing-hero-forms-schedule-demo-form.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `class-variance-authority`, `lucide-react`, `radix-ui`

## Files

### `components/blocks/marketing/hero-forms/schedule-demo-form.tsx`

```tsx
import { useState } from 'react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from '@/components/ui/select';
import {
  CalendarIcon,
  Clock10Icon,
  PhoneIcon,
  MonitorIcon,
  Users2Icon,
  ZapIcon,
  CheckCircle2Icon,
} from 'lucide-react';

export default function HeroFormScheduleDemo() {
  const [step, setStep] = useState(1);
  const [demoType, setDemoType] = useState<string>('');
  const [submitted, setSubmitted] = useState(false);

  const handleNext = () => {
    if (step < 2) {
      setStep(step + 1);
    } else {
      setSubmitted(true);
    }
  };

  const handleBack = () => {
    if (step > 1) {
      setStep(step - 1);
    }
  };

  const availableDates = [
    {
      date: 'Mon, Jun 10',
      slots: ['9:00 AM', '11:30 AM', '2:00 PM', '4:30 PM'],
    },
    { date: 'Tue, Jun 11', slots: ['10:00 AM', '1:00 PM', '3:30 PM'] },
    {
      date: 'Wed, Jun 12',
      slots: ['9:30 AM', '12:00 PM', '3:00 PM', '5:00 PM'],
    },
    { date: 'Thu, Jun 13', slots: ['8:00 AM', '10:30 AM', '2:30 PM'] },
    { date: 'Fri, Jun 14', slots: ['11:00 AM', '1:30 PM', '4:00 PM'] },
  ];

  const [selectedDate, setSelectedDate] = useState('');
  const [selectedTime, setSelectedTime] = useState('');

  return (
    <>
      {/* Hero */}
      <div className="bg-background relative overflow-hidden">
        <div className="absolute top-0 left-0 hidden h-40 w-full bg-gradient-to-r from-blue-500/10 via-indigo-500/10 to-purple-500/10 lg:block"></div>
        <div className="relative z-10 container mx-auto px-4 py-16 md:px-6 lg:py-24 2xl:max-w-[1400px]">
          <div className="grid items-center gap-12 lg:grid-cols-2">
            {/* Left Content */}
            <div>
              <div className="bg-primary/10 text-primary mb-6 inline-flex items-center rounded-full px-3 py-1 text-sm font-medium">
                <ZapIcon className="mr-1 h-4 w-4" />
                Personalized Experience
              </div>

              <h1 className="mb-4 text-4xl font-bold tracking-tight lg:text-5xl">
                Schedule a personalized product demo
              </h1>

              <p className="text-muted-foreground mb-8 text-xl">
                See how our platform can transform your workflow with a live
                demonstration tailored to your needs.
              </p>

              <div className="mb-10 space-y-6">
                <div className="flex items-start">
                  <div className="bg-primary/10 flex-shrink-0 rounded-full p-2">
                    <MonitorIcon className="text-primary h-5 w-5" />
                  </div>
                  <div className="ml-4">
                    <h3 className="text-base font-semibold">Customized demo</h3>
                    <p className="text-muted-foreground text-sm">
                      Tailored to your specific industry and needs
                    </p>
                  </div>
                </div>

                <div className="flex items-start">
                  <div className="bg-primary/10 flex-shrink-0 rounded-full p-2">
                    <Clock10Icon className="text-primary h-5 w-5" />
                  </div>
                  <div className="ml-4">
                    <h3 className="text-base font-semibold">
                      30-minute session
                    </h3>
                    <p className="text-muted-foreground text-sm">
                      Brief but comprehensive overview of key features
                    </p>
                  </div>
                </div>

                <div className="flex items-start">
                  <div className="bg-primary/10 flex-shrink-0 rounded-full p-2">
                    <Users2Icon className="text-primary h-5 w-5" />
                  </div>
                  <div className="ml-4">
                    <h3 className="text-base font-semibold">Bring your team</h3>
                    <p className="text-muted-foreground text-sm">
                      Invite colleagues to join your demo session
                    </p>
                  </div>
                </div>
              </div>

              <div className="bg-muted/50 border-border/50 mt-12 rounded-lg border p-6">
                <div className="flex items-start">
                  <div className="mt-1 flex-shrink-0">
                    <img
                      src="https://images.unsplash.com/photo-1560250097-0b93528c311a?q=80&w=1000&auto=format&fit=crop"
                      alt="Customer success manager"
                      width={48}
                      height={48}
                      className="rounded-full object-cover"
                    />
                  </div>
                  <div className="ml-4">
                    <p className="text-muted-foreground mb-2 italic">
                      &quot;Our product specialist will guide you through the
                      platform and answer any questions specific to your use
                      case.&quot;
                    </p>
                    <p className="text-sm font-medium">Michael Roberts</p>
                    <p className="text-muted-foreground text-xs">
                      Customer Success Manager
                    </p>
                  </div>
                </div>
              </div>
            </div>

            {/* Right Form */}
            <div className="bg-background rounded-xl border p-8 shadow-lg">
              {!submitted ? (
                <>
                  <div className="mb-6 flex items-center justify-between">
                    <h2 className="text-2xl font-bold">Schedule Your Demo</h2>
                    <div className="text-muted-foreground flex items-center text-sm">
                      Step {step} of 2
                    </div>
                  </div>

                  {/* Step 1: Contact Info */}
                  {step === 1 && (
                    <div className="space-y-4">
                      <div className="grid grid-cols-2 gap-4">
                        <div>
                          <Label htmlFor="firstName" className="mb-2">
                            First name
                          </Label>
                          <Input id="firstName" placeholder="John" required />
                        </div>
                        <div>
                          <Label htmlFor="lastName" className="mb-2">
                            Last name
                          </Label>
                          <Input id="lastName" placeholder="Doe" required />
                        </div>
                      </div>

                      <div>
                        <Label htmlFor="email" className="mb-2">
                          Work email
                        </Label>
                        <Input
                          id="email"
                          type="email"
                          placeholder="john@example.com"
                          required
                        />
                      </div>

                      <div>
                        <Label htmlFor="phone" className="mb-2">
                          Phone number
                        </Label>
                        <Input id="phone" placeholder="+1 (555) 000-0000" />
                      </div>

                      <div>
                        <Label htmlFor="company" className="mb-2">
                          Company
                        </Label>
                        <Input id="company" placeholder="Acme Inc." />
                      </div>

                      <div>
                        <Label htmlFor="role" className="mb-2">
                          Job title
                        </Label>
                        <Input id="role" placeholder="Product Manager" />
                      </div>

                      <div>
                        <Label htmlFor="team-size" className="mb-2">
                          Team size
                        </Label>
                        <Select>
                          <SelectTrigger id="team-size">
                            <SelectValue placeholder="Select team size" />
                          </SelectTrigger>
                          <SelectContent>
                            <SelectItem value="1-10">1-10 employees</SelectItem>
                            <SelectItem value="11-50">
                              11-50 employees
                            </SelectItem>
                            <SelectItem value="51-200">
                              51-200 employees
                            </SelectItem>
                            <SelectItem value="201-500">
                              201-500 employees
                            </SelectItem>
                            <SelectItem value="501+">501+ employees</SelectItem>
                          </SelectContent>
                        </Select>
                      </div>

                      <div>
                        <Label className="mb-2">
                          What are you interested in?
                        </Label>
                        <RadioGroup
                          value={demoType}
                          onValueChange={setDemoType}
                          className="mt-4 space-y-2"
                        >
                          <div className="flex items-start space-x-2">
                            <RadioGroupItem
                              value="product-overview"
                              id="product-overview"
                              className="mt-1"
                            />
                            <Label
                              htmlFor="product-overview"
                              className="cursor-pointer font-normal"
                            >
                              <span className="font-medium">
                                Product Overview
                              </span>
                              <p className="text-muted-foreground text-xs">
                                Complete walkthrough of all features
                              </p>
                            </Label>
                          </div>
                          <div className="flex items-start space-x-2">
                            <RadioGroupItem
                              value="specific-features"
                              id="specific-features"
                              className="mt-1"
                            />
                            <Label
                              htmlFor="specific-features"
                              className="cursor-pointer font-normal"
                            >
                              <span className="font-medium">
                                Specific Features
                              </span>
                              <p className="text-muted-foreground text-xs">
                                Focus on particular tools or capabilities
                              </p>
                            </Label>
                          </div>
                          <div className="flex items-start space-x-2">
                            <RadioGroupItem
                              value="pricing-options"
                              id="pricing-options"
                              className="mt-1"
                            />
                            <Label
                              htmlFor="pricing-options"
                              className="cursor-pointer font-normal"
                            >
                              <span className="font-medium">
                                Pricing & Options
                              </span>
                              <p className="text-muted-foreground text-xs">
                                Learn about plans and pricing structures
                              </p>
                            </Label>
                          </div>
                        </RadioGroup>
                      </div>

                      <Button
                        onClick={handleNext}
                        className="mt-2 w-full"
                        disabled={!demoType}
                      >
                        Continue to Schedule
                      </Button>
                    </div>
                  )}

                  {/* Step 2: Schedule */}
                  {step === 2 && (
                    <div className="space-y-6">
                      <div>
                        <Label className="mb-2 block">Select a date</Label>
                        <div className="grid grid-cols-3 gap-2 sm:grid-cols-5">
                          {availableDates.map((dateOption) => (
                            <button
                              key={dateOption.date}
                              type="button"
                              onClick={() => setSelectedDate(dateOption.date)}
                              className={`hover:border-primary rounded-md border p-2 text-center text-sm transition-colors ${
                                selectedDate === dateOption.date
                                  ? 'bg-primary/10 border-primary'
                                  : ''
                              }`}
                            >
                              {dateOption.date}
                            </button>
                          ))}
                        </div>
                      </div>

                      {selectedDate && (
                        <div>
                          <Label className="mb-2 block">Select a time</Label>
                          <div className="grid grid-cols-2 gap-2 sm:grid-cols-4">
                            {availableDates
                              .find((d) => d.date === selectedDate)
                              ?.slots.map((timeSlot) => (
                                <button
                                  key={timeSlot}
                                  type="button"
                                  onClick={() => setSelectedTime(timeSlot)}
                                  className={`hover:border-primary rounded-md border p-2 text-center text-sm transition-colors ${
                                    selectedTime === timeSlot
                                      ? 'bg-primary/10 border-primary'
                                      : ''
                                  }`}
                                >
                                  <span className="flex items-center justify-center">
                                    <Clock10Icon className="mr-1 h-3 w-3" />
                                    {timeSlot}
                                  </span>
                                </button>
                              ))}
                          </div>
                        </div>
                      )}

                      <div>
                        <Label htmlFor="notes" className="mb-2">
                          Additional notes (optional)
                        </Label>
                        <Textarea
                          id="notes"
                          placeholder="Let us know about any specific features you're interested in..."
                          rows={3}
                        />
                      </div>

                      <div className="flex flex-col gap-3 pt-4 sm:flex-row sm:justify-between">
                        <Button
                          variant="outline"
                          onClick={handleBack}
                          className="sm:w-1/3"
                        >
                          Back
                        </Button>
                        <Button
                          onClick={handleNext}
                          disabled={!selectedDate || !selectedTime}
                          className="sm:w-2/3"
                        >
                          Confirm Demo
                        </Button>
                      </div>
                    </div>
                  )}
                </>
              ) : (
                <div className="py-6 text-center">
                  <div className="mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-green-100">
                    <CheckCircle2Icon className="h-8 w-8 text-green-600" />
                  </div>

                  <h2 className="mb-2 text-2xl font-bold">Demo Scheduled!</h2>
                  <p className="text-muted-foreground mb-6">
                    Your demo has been confirmed. We&apos;ve sent you a calendar
                    invite.
                  </p>

                  <div className="bg-muted mb-6 rounded-lg p-4">
                    <div className="mb-2 flex items-center">
                      <CalendarIcon className="text-muted-foreground mr-2 h-4 w-4" />
                      <span className="font-medium">{selectedDate}</span>
                    </div>
                    <div className="mb-2 flex items-center">
                      <Clock10Icon className="text-muted-foreground mr-2 h-4 w-4" />
                      <span className="font-medium">{selectedTime} EST</span>
                    </div>
                    <div className="flex items-center">
                      <PhoneIcon className="text-muted-foreground mr-2 h-4 w-4" />
                      <span className="text-sm">
                        You&apos;ll receive a calendar invite with meeting
                        details
                      </span>
                    </div>
                  </div>

                  <div className="space-y-3">
                    <Button className="w-full">Add to Calendar</Button>
                    <Button variant="outline" className="w-full">
                      Invite a Colleague
                    </Button>
                  </div>
                </div>
              )}
            </div>
          </div>
        </div>
      </div>
      {/* End Hero */}
    </>
  );
}
```

### `components/ui/button.tsx`

```tsx
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"

import { cn } from "@/lib/utils"

const buttonVariants = cva(
  "group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/80",
        outline:
          "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
        secondary:
          "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
        ghost:
          "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
        destructive:
          "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
        link: "text-primary underline-offset-4 hover:underline",
      },
      size: {
        default:
          "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
        xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
        sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
        lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
        icon: "size-9",
        "icon-xs":
          "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
        "icon-sm":
          "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
        "icon-lg": "size-10",
      },
    },
    defaultVariants: {
      variant: "default",
      size: "default",
    },
  }
)

function Button({
  className,
  variant = "default",
  size = "default",
  asChild = false,
  ...props
}: React.ComponentProps<"button"> &
  VariantProps<typeof buttonVariants> & {
    asChild?: boolean
  }) {
  const Comp = asChild ? Slot.Root : "button"

  return (
    <Comp
      data-slot="button"
      data-variant={variant}
      data-size={size}
      className={cn(buttonVariants({ variant, size, className }))}
      {...props}
    />
  )
}

export { Button, buttonVariants }
```

### `components/ui/input.tsx`

```tsx
import * as React from "react"

import { cn } from "@/lib/utils"

function Input({ className, type, ...props }: React.ComponentProps<"input">) {
  return (
    <input
      type={type}
      data-slot="input"
      className={cn(
        "h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
        className
      )}
      {...props}
    />
  )
}

export { Input }
```

### `components/ui/label.tsx`

```tsx
"use client"

import * as React from "react"
import { Label as LabelPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"

function Label({
  className,
  ...props
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
  return (
    <LabelPrimitive.Root
      data-slot="label"
      className={cn(
        "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
        className
      )}
      {...props}
    />
  )
}

export { Label }
```

### `components/ui/textarea.tsx`

```tsx
import * as React from "react"

import { cn } from "@/lib/utils"

function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
  return (
    <textarea
      data-slot="textarea"
      className={cn(
        "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
        className
      )}
      {...props}
    />
  )
}

export { Textarea }
```

### `components/ui/radio-group.tsx`

```tsx
"use client"

import * as React from "react"
import { RadioGroup as RadioGroupPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"

function RadioGroup({
  className,
  ...props
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
  return (
    <RadioGroupPrimitive.Root
      data-slot="radio-group"
      className={cn("grid w-full gap-3", className)}
      {...props}
    />
  )
}

function RadioGroupItem({
  className,
  ...props
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
  return (
    <RadioGroupPrimitive.Item
      data-slot="radio-group-item"
      className={cn(
        "group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
        className
      )}
      {...props}
    >
      <RadioGroupPrimitive.Indicator
        data-slot="radio-group-indicator"
        className="flex size-4 items-center justify-center"
      >
        <span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
      </RadioGroupPrimitive.Indicator>
    </RadioGroupPrimitive.Item>
  )
}

export { RadioGroup, RadioGroupItem }
```

### `components/ui/select.tsx`

```tsx
"use client"

import * as React from "react"
import { Select as SelectPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"

function Select({
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
  return <SelectPrimitive.Root data-slot="select" {...props} />
}

function SelectGroup({
  className,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
  return (
    <SelectPrimitive.Group
      data-slot="select-group"
      className={cn("scroll-my-1 p-1", className)}
      {...props}
    />
  )
}

function SelectValue({
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
  return <SelectPrimitive.Value data-slot="select-value" {...props} />
}

function SelectTrigger({
  className,
  size = "default",
  children,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
  size?: "sm" | "default"
}) {
  return (
    <SelectPrimitive.Trigger
      data-slot="select-trigger"
      data-size={size}
      className={cn(
        "flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      {...props}
    >
      {children}
      <SelectPrimitive.Icon asChild>
        <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
      </SelectPrimitive.Icon>
    </SelectPrimitive.Trigger>
  )
}

function SelectContent({
  className,
  children,
  position = "item-aligned",
  align = "center",
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
  return (
    <SelectPrimitive.Portal>
      <SelectPrimitive.Content
        data-slot="select-content"
        data-align-trigger={position === "item-aligned"}
        className={cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", position ==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className )}
        position={position}
        align={align}
        {...props}
      >
        <SelectScrollUpButton />
        <SelectPrimitive.Viewport
          data-position={position}
          className={cn(
            "data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
            position === "popper" && ""
          )}
        >
          {children}
        </SelectPrimitive.Viewport>
        <SelectScrollDownButton />
      </SelectPrimitive.Content>
    </SelectPrimitive.Portal>
  )
}

function SelectLabel({
  className,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
  return (
    <SelectPrimitive.Label
      data-slot="select-label"
      className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
      {...props}
    />
  )
}

function SelectItem({
  className,
  children,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
  return (
    <SelectPrimitive.Item
      data-slot="select-item"
      className={cn(
        "relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
        className
      )}
      {...props}
    >
      <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
        <SelectPrimitive.ItemIndicator>
          <CheckIcon className="pointer-events-none" />
        </SelectPrimitive.ItemIndicator>
      </span>
      <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
    </SelectPrimitive.Item>
  )
}

function SelectSeparator({
  className,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
  return (
    <SelectPrimitive.Separator
      data-slot="select-separator"
      className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
      {...props}
    />
  )
}

function SelectScrollUpButton({
  className,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
  return (
    <SelectPrimitive.ScrollUpButton
      data-slot="select-scroll-up-button"
      className={cn(
        "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      {...props}
    >
      <ChevronUpIcon
      />
    </SelectPrimitive.ScrollUpButton>
  )
}

function SelectScrollDownButton({
  className,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
  return (
    <SelectPrimitive.ScrollDownButton
      data-slot="select-scroll-down-button"
      className={cn(
        "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      {...props}
    >
      <ChevronDownIcon
      />
    </SelectPrimitive.ScrollDownButton>
  )
}

export {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectLabel,
  SelectScrollDownButton,
  SelectScrollUpButton,
  SelectSeparator,
  SelectTrigger,
  SelectValue,
}
```
