# Date Field

> Native date input with label, description, and error slots.

Registry name: `date-field`. HTML docs: https://ui.anuragroy.dev/component/date-field.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/date-field.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/date-field.json`.

Registry JSON: https://ui.anuragroy.dev/r/date-field.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/date-field.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import { DateField } from "@/components/ui/date-field"
```

## Usage

```tsx
import { DateField } from "@/components/ui/date-field"

export function Example() {
  return <DateField label="Birthday" defaultValue="2000-01-01" />
}
```

## API

### DateField

Native `input type="date"` plus field chrome. Forwards remaining input props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | React.ReactNode | — |  |
| `description` | React.ReactNode | — |  |
| `errorMessage` | React.ReactNode | — |  |
| `containerClassName` | string | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/date-field): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/date-field.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
