Components
Loading preview...
Date input field with labels, descriptions, and validation built on React Aria DateField.
npx shadcn@latest add https://21st.dev/r/hero_ui/heroui-date-fieldimport { CalendarIcon, ChevronDownIcon, DateField, Label } from "@/components/ui/heroui-date-field";
export default function FullWidth() {
return (
<div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
<div className="w-[400px] space-y-4">
<DateField fullWidth name="date">
<Label>Date</Label>
<DateField.Group fullWidth>
<DateField.Input />
</DateField.Group>
</DateField>
<DateField fullWidth name="date-icons">
<Label>Date</Label>
<DateField.Group fullWidth>
<DateField.Prefix>
<CalendarIcon className="size-4 text-muted" />
</DateField.Prefix>
<DateField.Input />
<DateField.Suffix>
<ChevronDownIcon className="size-4 text-muted" />
</DateField.Suffix>
</DateField.Group>
</DateField>
</div>
</div>
);
}
export { FullWidth };