Park UI Logo
GitHub
Components
Input

Input

A field that allows user input, often used for forms or search functionality.

import { Stack } from 'styled-system/jsx'
import { FormLabel } from '~/components/ui/form-label'
import { Input, type InputProps } from '~/components/ui/input'

export const Demo = (props: InputProps) => {
  return (
    <Stack gap="1.5" width="2xs">
      <FormLabel htmlFor="name">Name</FormLabel>
      <Input id="name" placeholder="Your Name" {...props} />
    </Stack>
  )
}

Usage

import { Input } from '~/components/ui/input'

Example

Invalid

To indicate that the input is invalid, use the aria-invalid attribute.

<Input aria-invalid="true" value="christian[at]park-ui.com" />

Installation

npx @park-ui/cli components add input