Getting StartedInstall and bootstrap headless foundations 4
LayoutHeadless structural primitives for expandable and container patterns 6
OverlayHeadless modal and floating layer behavior 3
FeedbackHeadless notification and status communication patterns 5
FormHeadless input and selection contracts 17
UtilityReusable action, identity, and clipboard behavior 6
NavigationHeadless trails, trees, menus, and command surfaces 7

Styling contract

Headless Datepicker styling is entirely slot and state driven. The controller gives you stable public attributes so you can style the same field, overlay, and calendar structure with plain CSS or utility classes. The current helper directives apply those public attrs for you, so most applications style the slots instead of mirroring attribute maps manually.

CSS contract table

SelectorPurpose
[data-slot="datepicker"]Host root for shared field and popup theming. [tngDatepickerHost] applies this automatically.
[data-slot="datepicker-field"]Field wrapper containing the input shell and overlay anchor.
[data-slot="datepicker-input-shell"]Combined input and trigger chrome.
[data-slot="datepicker-input"]Editable text input surface. [tngDatepickerInput] applies the slot attr and input behavior.
[data-slot="datepicker-trigger"]Trigger button that toggles the calendar popup. [tngDatepickerTrigger] applies the slot and ARIA attrs.
[data-slot="datepicker-overlay"]Popup panel. [tngDatepickerOverlay] keeps this as the styling surface even after portaling.
[data-slot="datepicker-header"] / [data-slot="datepicker-period-button"]Header layout and month-year drill-down trigger. The nav/period directives add behavior without changing the styling hook.
[data-slot="datepicker-cell"]Day cell styling surface in the month grid. [tngDatepickerDayCell] applies item attrs and selection behavior.
[data-slot="datepicker-month"] / [data-slot="datepicker-year"]Month and year picker cells. [tngDatepickerMonthOption] and [tngDatepickerYearOption] apply the same public attrs.

State selectors

StateApplied onUse case
[data-open]Host, trigger, input shell, overlayOpen-state emphasis and shell changes.
[data-invalid]Input shellManual input parse or bounds errors.
[data-disabled]Host, day/month/year cellsDisabled field or blocked date visuals.
[data-selected]Day/month/year cellsCommitted selection state.
[data-focus-visible]Day/month/year cellsKeyboard focus treatment distinct from selection.
[data-active]Day/month/year cellsCurrent roving target when focus and selection differ.
[data-in-month]Day cellsDistinguishes spillover days from the current visible month.
[data-hidden]Day cellsSupports hidden placeholder cells when outside days are not shown.

Common custom properties

TokenTypical usage
--tng-datepicker-radiusField shell and overlay radius.
--tng-datepicker-field-heightCombined input and trigger height.
--tng-datepicker-overlay-gapDistance between the field anchor and the popup.
--tng-datepicker-overlay-paddingPopup panel padding.
--tng-datepicker-grid-gapSpacing between day, month, and year cells.
--tng-datepicker-inline-gap / --tng-datepicker-nav-sizeTrigger/nav spacing and wrapper-level control sizing.
--tng-datepicker-day-cell-sizeBase day-cell height.
--tng-datepicker-picker-cell-sizeBase month/year-cell height.
--tng-datepicker-brandSelected and focus-visible accent color.
--tng-datepicker-border / --tng-datepicker-border-strongField chrome, panel edges, and stronger selected-state borders.
--tng-datepicker-bg / --tng-datepicker-surface / --tng-datepicker-canvasField shell, control fills, and popup surface layers.
--tng-datepicker-fg / --tng-datepicker-mutedPrimary text, icon, weekday, and supporting copy colors.
--tng-datepicker-focus / --tng-datepicker-focus-shadowFocus ring color and the shared focus treatment used by the contract.
--tng-datepicker-shadow / --tng-datepicker-easePopup elevation and contract transition timing.

Scoped token overrides

css
.release-datepicker {
  color-scheme: light;
  --tng-datepicker-radius: 1rem;
  --tng-datepicker-field-height: 2.9rem;
  --tng-datepicker-overlay-gap: 0.56rem;
  --tng-datepicker-overlay-padding: 0.72rem;
  --tng-datepicker-grid-gap: clamp(0.14rem, 1.15%, 0.28rem);
  --tng-datepicker-inline-gap: 0.36rem;
  --tng-datepicker-day-cell-size: 2.2rem;
  --tng-datepicker-picker-cell-size: 2.3rem;
  --tng-datepicker-nav-size: 1.95rem;
  --tng-datepicker-bg: #ffffff;
  --tng-datepicker-surface: #f8fafc;
  --tng-datepicker-canvas: #ffffff;
  --tng-datepicker-fg: #0f172a;
  --tng-datepicker-muted: #64748b;
  --tng-datepicker-brand: #2563eb;
  --tng-datepicker-border: #cbd5e1;
  --tng-datepicker-border-strong: #94a3b8;
  --tng-datepicker-focus: #2563eb;
  --tng-datepicker-focus-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  --tng-datepicker-shadow:
    0 22px 38px rgba(15, 23, 42, 0.12),
    0 10px 20px rgba(15, 23, 42, 0.08);
}