Input 10

PreviousNext

An email input field with right-aligned helper text for privacy assurance

Docs
shadcn-studiocomponent

Preview

Loading preview…
registry/new-york/components/input/input-10.tsx
import { useId } from 'react'

import { Input } from '@/registry/new-york/ui/input'
import { Label } from '@/registry/new-york/ui/label'

const InputEndHelperTextDemo = () => {
  const id = useId()

  return (
    <div className='w-full max-w-xs space-y-2'>
      <Label htmlFor={id}>Input with end helper text</Label>
      <Input id={id} type='email' placeholder='Email address' />
      <p className='text-muted-foreground text-end text-xs'>We&apos;ll never share your email with anyone else.</p>
    </div>
  )
}

export default InputEndHelperTextDemo

Installation

npx shadcn@latest add @shadcn-studio/input-10

Usage

import { Input10 } from "@/components/input-10"
<Input10 />