Input 7

PreviousNext

An email input field with a pre-filled default value

Docs
shadcn-studiocomponent

Preview

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

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

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

  return (
    <div className='w-full max-w-xs space-y-2'>
      <Label htmlFor={id}>Input with default value</Label>
      <Input id={id} type='email' placeholder='Email address' defaultValue='example@email.com' />
    </div>
  )
}

export default InputDefaultValueDemo

Installation

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

Usage

import { Input07 } from "@/components/input-07"
<Input07 />