# User Feedback Form

> A hero with a user feedback form for comments, ratings, and contact info. Collects honest input from visitors to guide the next product update.

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-user-feedback-form).

- Page, with a live preview: https://shadcn.exchange/r/shadcn-ui-blocks/marketing-hero-forms-user-feedback-form
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcn-ui-blocks/marketing-hero-forms-user-feedback-form-light-ebfe3add30a34139.png
- Registry item: https://www.shadcn-ui-blocks.com/r/marketing-hero-forms-user-feedback-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-user-feedback-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/user-feedback-form.tsx`

```tsx
import { useState } from 'react';
import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Slider } from '@/components/ui/slider';
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
import { Checkbox } from '@/components/ui/checkbox';
import { Card, CardContent, CardHeader } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Separator } from '@/components/ui/separator';
import { CheckIcon, ChevronRightIcon, StarIcon } from 'lucide-react';

export default function HeroFormUserFeedback() {
  const [step, setStep] = useState(1);
  const [submitted, setSubmitted] = useState(false);
  const [feedback, setFeedback] = useState({
    // Rating scores (1-10)
    ratings: {
      overall: 8,
      usability: 7,
      features: 8,
      support: 6,
      value: 9,
    },
    // Recommendation score (0-10)
    nps: 8,
    // Feature usage
    usedFeatures: [] as string[],
    // Text feedback
    improvements: '',
    likedMost: '',
    email: '',
    // Would use again
    wouldUseAgain: 'yes',
  });

  // Features list for checkboxes
  const featuresList = [
    { id: 'feature1', label: 'Dashboard' },
    { id: 'feature2', label: 'Reports & Analytics' },
    { id: 'feature3', label: 'User Management' },
    { id: 'feature4', label: 'Automation Tools' },
    { id: 'feature5', label: 'Mobile App' },
    { id: 'feature6', label: 'Integrations' },
    { id: 'feature7', label: 'Content Management' },
    { id: 'feature8', label: 'Customization Options' },
  ];

  // Handle rating changes
  const handleRatingChange = (
    category: keyof typeof feedback.ratings,
    value: number[]
  ) => {
    setFeedback({
      ...feedback,
      ratings: {
        ...feedback.ratings,
        [category]: value[0],
      },
    });
  };

  // Handle feature toggle
  const toggleFeature = (featureId: string) => {
    if (feedback.usedFeatures.includes(featureId)) {
      setFeedback({
        ...feedback,
        usedFeatures: feedback.usedFeatures.filter((id) => id !== featureId),
      });
    } else {
      setFeedback({
        ...feedback,
        usedFeatures: [...feedback.usedFeatures, featureId],
      });
    }
  };

  // Get average rating
  const getAverageRating = () => {
    const ratings = Object.values(feedback.ratings);
    return (
      ratings.reduce((sum, rating) => sum + rating, 0) / ratings.length
    ).toFixed(1);
  };

  // Get NPS category
  const getNPSCategory = () => {
    const score = feedback.nps;
    if (score >= 9) return 'Promoter';
    if (score >= 7) return 'Passive';
    return 'Detractor';
  };

  // Get stars display for a rating
  const getStarsDisplay = (rating: number) => {
    return Array(5)
      .fill(0)
      .map((_, i) => {
        const filled = i < Math.round(rating / 2);
        return (
          <StarIcon
            key={i}
            className={`h-5 w-5 ${
              filled
                ? 'fill-yellow-400 text-yellow-400'
                : 'text-gray-300 dark:text-gray-600'
            }`}
          />
        );
      });
  };

  // Handle form navigation
  const nextStep = () => {
    setStep(step + 1);
  };

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

  // Handle form submission
  const handleSubmit = (e: React.FormEvent) => {
    e.preventDefault();
    setSubmitted(true);
  };

  return (
    <>
      {/* Hero */}
      <div className="relative overflow-hidden bg-gradient-to-b from-slate-50 to-white dark:from-slate-950 dark:to-slate-900">
        <div className="bg-grid-slate-200 dark:bg-grid-slate-800/20 absolute inset-0 bg-[size:24px_24px] opacity-10"></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="mx-auto max-w-3xl">
            <div className="mb-8 text-center">
              {!submitted ? (
                <>
                  <Badge
                    variant="outline"
                    className="mb-4 px-3 py-1 text-sm font-medium"
                  >
                    Help us improve
                  </Badge>
                  <h1 className="mb-4 text-4xl font-bold tracking-tight sm:text-5xl">
                    Your feedback matters
                  </h1>
                  <p className="text-muted-foreground mx-auto max-w-2xl text-xl">
                    We value your opinion and would love to hear about your
                    experience with our product.
                  </p>
                </>
              ) : (
                <>
                  <Badge
                    variant="outline"
                    className="mb-4 border-green-600 px-3 py-1 text-sm font-medium text-green-600"
                  >
                    Success
                  </Badge>
                  <h1 className="mb-4 text-4xl font-bold tracking-tight sm:text-5xl">
                    Thanks for your feedback!
                  </h1>
                  <p className="text-muted-foreground mx-auto max-w-2xl text-xl">
                    Your insights help us create a better product for everyone.
                  </p>
                </>
              )}
            </div>

            {!submitted ? (
              <Card className="border shadow-sm">
                <CardHeader className="p-6">
                  {/* Progress steps */}
                  <div className="mb-2">
                    <div className="flex items-center justify-between">
                      <div className="text-muted-foreground text-sm font-medium">
                        Step {step} of 3
                      </div>
                      <div className="text-sm font-medium">
                        {step === 1
                          ? 'Overall Ratings'
                          : step === 2
                            ? 'Features & Experience'
                            : 'Final Thoughts'}
                      </div>
                    </div>
                    <div className="mt-2 h-2 w-full rounded-full bg-slate-100 dark:bg-slate-800">
                      <div
                        className="bg-primary h-2 rounded-full transition-all"
                        style={{ width: `${(step / 3) * 100}%` }}
                      ></div>
                    </div>
                  </div>
                </CardHeader>

                <CardContent className="p-6 pt-0">
                  <form onSubmit={handleSubmit}>
                    {/* Step 1: Overall Rating */}
                    {step === 1 && (
                      <div className="space-y-6">
                        {/* Overall Satisfaction */}
                        <div className="space-y-3">
                          <div className="flex items-center justify-between">
                            <Label htmlFor="overall-rating">
                              Overall Satisfaction
                            </Label>
                            <div className="flex items-center">
                              {getStarsDisplay(feedback.ratings.overall)}
                              <span className="ml-2 text-sm font-medium">
                                {feedback.ratings.overall}/10
                              </span>
                            </div>
                          </div>
                          <Slider
                            id="overall-rating"
                            min={1}
                            max={10}
                            step={1}
                            value={[feedback.ratings.overall]}
                            onValueChange={(value) =>
                              handleRatingChange('overall', value)
                            }
                          />
                          <div className="text-muted-foreground flex justify-between text-xs">
                            <span>Very Dissatisfied</span>
                            <span>Very Satisfied</span>
                          </div>
                        </div>

                        {/* Usability */}
                        <div className="space-y-3">
                          <div className="flex items-center justify-between">
                            <Label htmlFor="usability-rating">
                              Usability & Ease of Use
                            </Label>
                            <span className="text-sm font-medium">
                              {feedback.ratings.usability}/10
                            </span>
                          </div>
                          <Slider
                            id="usability-rating"
                            min={1}
                            max={10}
                            step={1}
                            value={[feedback.ratings.usability]}
                            onValueChange={(value) =>
                              handleRatingChange('usability', value)
                            }
                          />
                        </div>

                        {/* Features */}
                        <div className="space-y-3">
                          <div className="flex items-center justify-between">
                            <Label htmlFor="features-rating">
                              Features & Functionality
                            </Label>
                            <span className="text-sm font-medium">
                              {feedback.ratings.features}/10
                            </span>
                          </div>
                          <Slider
                            id="features-rating"
                            min={1}
                            max={10}
                            step={1}
                            value={[feedback.ratings.features]}
                            onValueChange={(value) =>
                              handleRatingChange('features', value)
                            }
                          />
                        </div>

                        {/* Support */}
                        <div className="space-y-3">
                          <div className="flex items-center justify-between">
                            <Label htmlFor="support-rating">
                              Customer Support
                            </Label>
                            <span className="text-sm font-medium">
                              {feedback.ratings.support}/10
                            </span>
                          </div>
                          <Slider
                            id="support-rating"
                            min={1}
                            max={10}
                            step={1}
                            value={[feedback.ratings.support]}
                            onValueChange={(value) =>
                              handleRatingChange('support', value)
                            }
                          />
                        </div>

                        {/* Value */}
                        <div className="space-y-3">
                          <div className="flex items-center justify-between">
                            <Label htmlFor="value-rating">
                              Value for Money
                            </Label>
                            <span className="text-sm font-medium">
                              {feedback.ratings.value}/10
                            </span>
                          </div>
                          <Slider
                            id="value-rating"
                            min={1}
                            max={10}
                            step={1}
                            value={[feedback.ratings.value]}
                            onValueChange={(value) =>
                              handleRatingChange('value', value)
                            }
                          />
                        </div>

                        {/* Net Promoter Score */}
                        <div className="space-y-3 pt-4">
                          <Label htmlFor="nps-rating">
                            How likely are you to recommend our product to
                            others?
                          </Label>
                          <Slider
                            id="nps-rating"
                            min={0}
                            max={10}
                            step={1}
                            value={[feedback.nps]}
                            onValueChange={(value) =>
                              setFeedback({ ...feedback, nps: value[0]! })
                            }
                          />
                          <div className="flex justify-between">
                            <span className="text-muted-foreground text-xs">
                              Not likely at all
                            </span>
                            <span className="text-sm font-medium">
                              {feedback.nps}/10
                            </span>
                            <span className="text-muted-foreground text-xs">
                              Extremely likely
                            </span>
                          </div>
                          <div className="mt-2 text-sm font-medium">
                            Category:{' '}
                            <span
                              className={`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${
                                getNPSCategory() === 'Promoter'
                                  ? 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400'
                                  : getNPSCategory() === 'Passive'
                                    ? 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400'
                                    : 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400'
                              }`}
                            >
                              {getNPSCategory()}
                            </span>
                          </div>
                        </div>
                      </div>
                    )}

                    {/* Step 2: Features & Experience */}
                    {step === 2 && (
                      <div className="space-y-6">
                        <div className="space-y-3">
                          <Label>
                            Which features did you use? (Select all that apply)
                          </Label>
                          <div className="mt-2 grid gap-3 md:grid-cols-2">
                            {featuresList.map((feature) => (
                              <div
                                key={feature.id}
                                className="flex items-center space-x-2"
                              >
                                <Checkbox
                                  id={feature.id}
                                  checked={feedback.usedFeatures.includes(
                                    feature.id
                                  )}
                                  onCheckedChange={() =>
                                    toggleFeature(feature.id)
                                  }
                                />
                                <Label
                                  htmlFor={feature.id}
                                  className="cursor-pointer text-sm font-normal"
                                >
                                  {feature.label}
                                </Label>
                              </div>
                            ))}
                          </div>
                        </div>

                        <Separator />

                        <div className="space-y-3">
                          <Label htmlFor="liked-most">
                            What did you like most about our product?
                          </Label>
                          <Textarea
                            id="liked-most"
                            value={feedback.likedMost}
                            onChange={(e) =>
                              setFeedback({
                                ...feedback,
                                likedMost: e.target.value,
                              })
                            }
                            placeholder="Share what you enjoyed about your experience..."
                            rows={3}
                          />
                        </div>

                        <div className="space-y-3">
                          <Label htmlFor="improvements">
                            What do you think could be improved?
                          </Label>
                          <Textarea
                            id="improvements"
                            value={feedback.improvements}
                            onChange={(e) =>
                              setFeedback({
                                ...feedback,
                                improvements: e.target.value,
                              })
                            }
                            placeholder="Tell us how we can make your experience better..."
                            rows={3}
                          />
                        </div>
                      </div>
                    )}

                    {/* Step 3: Final Thoughts */}
                    {step === 3 && (
                      <div className="space-y-6">
                        <div className="space-y-3">
                          <Label>
                            Would you use our product again in the future?
                          </Label>
                          <RadioGroup
                            value={feedback.wouldUseAgain}
                            onValueChange={(value) =>
                              setFeedback({ ...feedback, wouldUseAgain: value })
                            }
                            className="flex flex-col space-y-1"
                          >
                            <div className="flex items-center space-x-2">
                              <RadioGroupItem value="yes" id="use-again-yes" />
                              <Label
                                htmlFor="use-again-yes"
                                className="font-normal"
                              >
                                Yes, definitely
                              </Label>
                            </div>
                            <div className="flex items-center space-x-2">
                              <RadioGroupItem
                                value="maybe"
                                id="use-again-maybe"
                              />
                              <Label
                                htmlFor="use-again-maybe"
                                className="font-normal"
                              >
                                Maybe, it depends
                              </Label>
                            </div>
                            <div className="flex items-center space-x-2">
                              <RadioGroupItem value="no" id="use-again-no" />
                              <Label
                                htmlFor="use-again-no"
                                className="font-normal"
                              >
                                No, I wouldn&apos;t
                              </Label>
                            </div>
                          </RadioGroup>
                        </div>

                        <Separator />

                        <div className="space-y-3">
                          <Label htmlFor="email">
                            Email address (optional, for follow-up questions)
                          </Label>
                          <Input
                            id="email"
                            type="email"
                            placeholder="you@example.com"
                            value={feedback.email}
                            onChange={(e) =>
                              setFeedback({
                                ...feedback,
                                email: e.target.value,
                              })
                            }
                          />
                          <p className="text-muted-foreground text-xs">
                            We&apos;ll never share your email with anyone else.
                          </p>
                        </div>

                        <div className="mt-4 rounded-lg bg-slate-50 p-4 dark:bg-slate-800/50">
                          <h3 className="mb-3 text-sm font-medium">
                            Summary of Your Feedback
                          </h3>
                          <div className="space-y-2">
                            <div className="flex justify-between text-sm">
                              <span className="text-muted-foreground">
                                Average Rating:
                              </span>
                              <div className="flex items-center">
                                {getStarsDisplay(
                                  parseFloat(getAverageRating())
                                )}
                                <span className="ml-2">
                                  {getAverageRating()}/10
                                </span>
                              </div>
                            </div>
                            <div className="flex justify-between text-sm">
                              <span className="text-muted-foreground">
                                Recommendation:
                              </span>
                              <span>
                                {feedback.nps}/10 ({getNPSCategory()})
                              </span>
                            </div>
                            <div className="flex justify-between text-sm">
                              <span className="text-muted-foreground">
                                Features Used:
                              </span>
                              <span>
                                {feedback.usedFeatures.length}/
                                {featuresList.length}
                              </span>
                            </div>
                          </div>
                        </div>
                      </div>
                    )}

                    {/* Navigation Buttons */}
                    <div className="mt-8 flex justify-between">
                      {step > 1 ? (
                        <Button
                          type="button"
                          variant="outline"
                          onClick={prevStep}
                        >
                          Back
                        </Button>
                      ) : (
                        <div></div>
                      )}
                      {step < 3 ? (
                        <Button type="button" onClick={nextStep}>
                          Continue
                          <ChevronRightIcon className="ml-2 h-4 w-4" />
                        </Button>
                      ) : (
                        <Button type="submit">
                          Submit Feedback
                          <ChevronRightIcon className="ml-2 h-4 w-4" />
                        </Button>
                      )}
                    </div>
                  </form>
                </CardContent>
              </Card>
            ) : (
              <Card className="border p-8 text-center shadow-sm">
                <div className="mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-green-100 dark:bg-green-900/30">
                  <CheckIcon className="h-10 w-10 text-green-600 dark:text-green-400" />
                </div>
                <div className="mb-6 space-y-2">
                  <h3 className="text-2xl font-bold">
                    Feedback Successfully Submitted
                  </h3>
                  <p className="text-muted-foreground">
                    Thank you for taking the time to share your experience with
                    us.
                  </p>
                </div>

                <div className="mx-auto mb-6 max-w-md rounded-lg bg-slate-50 p-6 dark:bg-slate-800/50">
                  <div className="space-y-4">
                    <div className="text-center">
                      <div className="text-muted-foreground mb-1 text-sm">
                        Your Average Rating
                      </div>
                      <div className="flex items-center justify-center">
                        {getStarsDisplay(parseFloat(getAverageRating()))}
                        <span className="ml-2 text-lg font-bold">
                          {getAverageRating()}/10
                        </span>
                      </div>
                    </div>
                    <Separator />
                    <div className="text-center">
                      <div className="text-muted-foreground mb-1 text-sm">
                        Your Recommendation Score
                      </div>
                      <div className="text-lg font-bold">{feedback.nps}/10</div>
                      <div
                        className={`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${
                          getNPSCategory() === 'Promoter'
                            ? 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400'
                            : getNPSCategory() === 'Passive'
                              ? 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400'
                              : 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400'
                        }`}
                      >
                        {getNPSCategory()}
                      </div>
                    </div>
                  </div>
                </div>

                <div className="space-y-3">
                  <p className="text-muted-foreground text-sm">
                    We constantly work to improve our product based on feedback
                    like yours.
                    {feedback.email &&
                      " We'll follow up with you soon if we have any questions."}
                  </p>
                  <Button variant="outline" onClick={() => setSubmitted(false)}>
                    Submit Another Response
                  </Button>
                </div>
              </Card>
            )}

            <div className="text-muted-foreground mt-8 text-center text-sm">
              <p>
                Need immediate assistance? Contact our support team at
                support@example.com
              </p>
            </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/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/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/slider.tsx`

```tsx
"use client"

import * as React from "react"
import { Slider as SliderPrimitive } from "radix-ui"

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

function Slider({
  className,
  defaultValue,
  value,
  min = 0,
  max = 100,
  ...props
}: React.ComponentProps<typeof SliderPrimitive.Root>) {
  const _values = React.useMemo(
    () =>
      Array.isArray(value)
        ? value
        : Array.isArray(defaultValue)
          ? defaultValue
          : [min, max],
    [value, defaultValue, min, max]
  )

  return (
    <SliderPrimitive.Root
      data-slot="slider"
      defaultValue={defaultValue}
      value={value}
      min={min}
      max={max}
      className={cn(
        "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
        className
      )}
      {...props}
    >
      <SliderPrimitive.Track
        data-slot="slider-track"
        className="relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5"
      >
        <SliderPrimitive.Range
          data-slot="slider-range"
          className="absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
        />
      </SliderPrimitive.Track>
      {Array.from({ length: _values.length }, (_, index) => (
        <SliderPrimitive.Thumb
          data-slot="slider-thumb"
          key={index}
          className="block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] select-none hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
        />
      ))}
    </SliderPrimitive.Root>
  )
}

export { Slider }
```

### `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/checkbox.tsx`

```tsx
"use client"

import * as React from "react"
import { Checkbox as CheckboxPrimitive } from "radix-ui"

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

function Checkbox({
  className,
  ...props
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
  return (
    <CheckboxPrimitive.Root
      data-slot="checkbox"
      className={cn(
        "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 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}
    >
      <CheckboxPrimitive.Indicator
        data-slot="checkbox-indicator"
        className="grid place-content-center text-current transition-none [&>svg]:size-3.5"
      >
        <CheckIcon
        />
      </CheckboxPrimitive.Indicator>
    </CheckboxPrimitive.Root>
  )
}

export { Checkbox }
```

### `components/ui/card.tsx`

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

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

function Card({
  className,
  size = "default",
  ...props
}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
  return (
    <div
      data-slot="card"
      data-size={size}
      className={cn(
        "group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
        className
      )}
      {...props}
    />
  )
}

function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-header"
      className={cn(
        "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4",
        className
      )}
      {...props}
    />
  )
}

function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-title"
      className={cn(
        "font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",
        className
      )}
      {...props}
    />
  )
}

function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-description"
      className={cn("text-sm text-muted-foreground", className)}
      {...props}
    />
  )
}

function CardAction({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-action"
      className={cn(
        "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
        className
      )}
      {...props}
    />
  )
}

function CardContent({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-content"
      className={cn("px-6 group-data-[size=sm]/card:px-4", className)}
      {...props}
    />
  )
}

function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-footer"
      className={cn(
        "flex items-center rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4",
        className
      )}
      {...props}
    />
  )
}

export {
  Card,
  CardHeader,
  CardFooter,
  CardTitle,
  CardAction,
  CardDescription,
  CardContent,
}
```

### `components/ui/badge.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 badgeVariants = cva(
  "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
        secondary:
          "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
        destructive:
          "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
        outline:
          "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
        ghost:
          "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
        link: "text-primary underline-offset-4 hover:underline",
      },
    },
    defaultVariants: {
      variant: "default",
    },
  }
)

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

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

export { Badge, badgeVariants }
```

### `components/ui/separator.tsx`

```tsx
"use client";

import * as React from "react";
import { Separator as SeparatorPrimitive } from "radix-ui";

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

function Separator({
  className,
  orientation = "horizontal",
  decorative = true,
  ...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
  return (
    <SeparatorPrimitive.Root
      data-slot="separator"
      decorative={decorative}
      orientation={orientation}
      className={cn(
        "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px ",
        className
      )}
      {...props}
    />
  );
}

export { Separator };
```
