Input 30

PreviousNext

An email input field paired with a subscribe button for newsletter signups

Docs
shadcn-studiocomponent

Preview

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

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

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

  return (
    <div className='w-full max-w-xs space-y-2'>
      <Label htmlFor={id}>Input with button</Label>
      <div className='flex gap-2'>
        <Input id={id} type='email' placeholder='Email address' />
        <Button type='submit'>Subscribe</Button>
      </div>
    </div>
  )
}

export default InputButtonDemo

Installation

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

Usage

import { Input30 } from "@/components/input-30"
<Input30 />