Input OTP
crenspire-glass-ui/input-otpFreeComponent
Accessible one-time password component with copy paste functionality.
Live preview
live · rendered by the registry
Rendered by crenspire/glass-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glass-ui.crenspire.com/r/input-otp.jsonSource
1"use client"23import * as React from "react"4import {5 InputOTP as BaseInputOTP,6 InputOTPGroup as BaseInputOTPGroup,7 InputOTPSeparator,8 InputOTPSlot as BaseInputOTPSlot,9} from "@/components/ui/input-otp"10import { cn } from "@/lib/utils"1112export interface InputOTPProps extends React.ComponentProps<typeof BaseInputOTP> {13 glow?: boolean14}1516export interface InputOTPGroupProps extends React.ComponentProps<typeof BaseInputOTPGroup> {17 glow?: boolean18}1920export interface InputOTPSlotProps extends React.ComponentProps<typeof BaseInputOTPSlot> {21 glow?: boolean22}2324/**25 * Glass UI Input OTP - Enhanced OTP input with glassy effects26 */27export const InputOTP = React.forwardRef<28 React.ElementRef<typeof BaseInputOTP>,29 InputOTPProps30>(({ className, variant = "glass", glow = false, ...props }, ref) => {31 return (32 <BaseInputOTP33 ref={ref}34 variant={variant}35 className={cn(36 glow && "shadow-md shadow-purple-500/20",37 className38 )}39 {...props}40 />41 )42})43InputOTP.displayName = "InputOTP"4445export const InputOTPGroup = React.forwardRef<46 HTMLDivElement,47 InputOTPGroupProps48>(({ className, variant = "glass", glow = false, ...props }, ref) => {49 return (50 <BaseInputOTPGroup51 ref={ref}52 variant={variant}53 className={cn(54 glow && "shadow-md shadow-purple-500/20",55 className56 )}57 {...props}58 />59 )60})61InputOTPGroup.displayName = "InputOTPGroup"6263export const InputOTPSlot = React.forwardRef<64 HTMLDivElement,65 InputOTPSlotProps66>(({ className, variant = "glass", glow = false, ...props }, ref) => {67 return (68 <BaseInputOTPSlot69 ref={ref}70 variant={variant}71 className={cn(72 glow && "ring-1 ring-purple-500/20",73 className74 )}75 {...props}76 />77 )78})79InputOTPSlot.displayName = "InputOTPSlot"8081export {82 InputOTPSeparator,83}84
What it pulls in
npm packages
Other registry items
Files it writes
More from crenspire/glass-ui
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Alertalert | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Alert Dialogalert-dialog | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Avataravatar | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Badgebadge | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Breadcrumbbreadcrumb | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Buttonbutton | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Button Groupbutton-group | crenspire/glass-ui | Components | Free | no deps · 5 files |
