Inputs
Natural Language Date Field
Natural Language Date Field: A text field that reads phrases like 'in 2 days' or 'next friday' as a real date, with a calendar popover and a live preview sentence below.
Using Natural Language Date Field
Natural Language Date Field uses the inline preview frame with a light/dark theme setting.
Customize the preview
These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.
| Control | Type | Default | Preview limits |
|---|---|---|---|
accent | color | #38BDF8 | No additional limit in the metadata. |
label | text | Schedule Date | Up to 30 characters |
phrase | text | In 2 days | Up to 24 characters |
previewPrefix | text | Your post will be published on | Up to 60 characters |
Which frameworks are available for Natural Language Date Field?
Natural Language Date Field is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.
What does Natural Language Date Field depend on?
The React metadata lists these npm dependencies beyond React: motion, radix-ui, clsx.
What accessibility details are visible in Natural Language Date Field?
The React source for Natural Language Date Field includes: native elements (button, input, label); attributes and handlers (aria-describedby, aria-expanded, aria-hidden, aria-label, onKeyDown); key comparisons (ArrowDown). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Natural Language Date Field handle reduced motion?
Natural Language Date Field reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: duration: reduced ? 0.08 : 0.16; reduced ? { opacity: 0 } : { opacity: 0, scale: 0.94, y: -4 }; reduced ? { opacity: 0 } : { opacity: 0, scale: 0.94, y: -4, transition: { duration: 0.1, ease: EASE } }. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.