Input 9

PreviousNext

An input field with helper text below for additional guidance

Docs
shadcn-studiocomponent

Preview

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

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

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

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

export default InputStartHelperTextDemo

Installation

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

Usage

import { Input09 } from "@/components/input-09"
<Input09 />