my/ui

Command Palette

Search for a command to run...

All components

Input With Hint

inputs

Origin UI component.

responsive · 380px

Install

Same command in any shadcn project — React (Vite/CRA), Next.js, Remix, Astro, and more:

$npx shadcn@latest add https://your-domain/r/comp-04.json

Usage

import Cmp from "@/registry/origin-ui/comp-04";

export default function Demo() {
  return <Cmp />;
}

Component source

import { useId } from "react";

import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

export default function Component() {
  const id = useId();
  return (
    <div className="*:not-first:mt-2">
      <div className="flex items-center justify-between gap-2">
        <Label className="leading-6" htmlFor={id}>
          Input with hint
        </Label>
        <span className="text-muted-foreground text-sm">Optional</span>
      </div>
      <Input id={id} placeholder="Email" type="email" />
    </div>
  );
}

Source: Origin UI