Components
Loading preview...
Upgaraded shadcn/ui Input
npx shadcn@latest add https://21st.dev/r/originui/inputimport { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { useId } from "react";
function Component() {
const id = useId();
return (
<div className="space-y-2 min-w-[300px]">
<Label htmlFor={id}>Input with end inline add-on</Label>
<div className="relative">
<Input id={id} className="peer pe-12" placeholder="google" type="text" />
<span className="pointer-events-none absolute inset-y-0 end-0 flex items-center justify-center pe-3 text-sm text-muted-foreground peer-disabled:opacity-50">
.com
</span>
</div>
</div>
);
}
export { Component };