Overlay Hint

Tokenized instruction pill with default frosted glass, a muted chip, and a marquee variant with scrolling text, trailing icon action, and sm or md density.

Installation

Install with the CLI, or copy the component source into your project.

Add overlay-hint (npm)

npx --yes -p github:itsvigneshv/default-file-ui#main df-ui add overlay-hint

Default

Frosted glass for tool canvases. Toggle the preview surface to switch between light and dark. Same recipe, inverted chrome.

Live previewAutosaved

Muted

Solid muted surface chip for light tool headers and stages (Color Lab, Design Extractor). Separate from frosted glass.

Slate11 stops

Single label

Pass children for a one-line hint. Prefer parts when you need a separator between segments.

Press Esc to close the panel

Custom separator

Replace the middle dot with a glyph, icon, or custom divider. Use OVERLAY_HINT_SEPARATOR for the stock dot.

Live previewAutosaved
Live previewAutosaved
Live previewAutosaved

Leading and trailing

Optional leading and trailing slots for icons or custom nodes.

Snap to gridOn

Muted with slots

Leading and trailing work the same on the muted variant.

Drop a screenshotExtract tokens

Radius and chrome

Tune corner radius, fill, border, label, shadow, and blur with props or --overlay-hint-* CSS variables.

Live previewAutosaved
Custom fillCustom border
TokenizedChrome

Marquee

Scrolling label with a trailing kit icon-only Button. Hover does not pause the loop. By default the whole chip is clickable (clickTarget chip). Docs demos toast on click instead of navigating away.

Marquee dark

Pass scheme="dark" for the dark marquee recipe on dark canvases.

Marquee click target

clickTarget chip makes the whole hint the hit target. action limits clicks to the trailing control only. Each demo toasts so you can tell which target fired.

Only the arrow button is clickable

Marquee size

size controls marquee density. sm is compact for marketing chrome; md is the default catalogue size.

Marquee width

marqueeWidth sets the visible scrolling viewport. Pass any CSS length; theme default is 12rem.

Radius

Three chip radii that read apart: none, md, and full. The trailing control stays a kit icon-only Button.

Marquee speed

speed is the loop duration in seconds. Smaller values scroll faster.

Faster loop at speed 8
Slower loop at speed 24

Properties

Instruction or status pill for tool chrome. Default is frosted glass that follows light and dark surfaces. Muted is a solid chip. Marquee scrolls the label with an optional trailing icon action and sm or md density. Chrome is tokenized via --overlay-hint-*.

OverlayHint

PropTypeDefaultNotes
variant"default" | "muted" | "marquee""default"default frosted glass that adapts under a .dark surface. muted solid surface chip. marquee scrolling label with an optional trailing icon action.
scheme"light" | "dark"-Explicit light or dark recipe for marquee. When omitted, marquee follows a .dark ancestor like default.
speednumber18Marquee loop duration in seconds. Smaller values scroll faster. Sets --overlay-hint-marquee-duration.
marqueeWidthstring-Visible marquee viewport width. Any CSS length such as 10rem or 14rem. Theme default is 12rem. Sets --overlay-hint-marquee-width.
clickTarget"chip" | "action""chip"Marquee hit target. chip makes the whole hint clickable; the trailing icon is decorative. action limits clicks to the trailing control only.
size"sm" | "md""md"Marquee density only. md is the default chip. sm tightens padding, uses text-11 type, and shrinks the trailing control for compact tool chrome. Ignored on default and muted.
actionReactNode-Icon for the trailing marquee control. Renders as a kit icon-only Button (size icon-xs, variant secondary). Decorative when clickTarget is chip; interactive when clickTarget is action.
actionLabelstring-Accessible name for the interactive control (whole chip or trailing action).
onActionMouseEventHandler<HTMLElement>-Click handler when the interactive control renders as a button.
actionHrefstring-When set, the interactive control renders as a link instead of a button.
radius"none" | "md" | "full""md"Corner radius for the hint chip: none square, md soft, full pill. Three steps kept distinct. Trailing marquee control uses the Button radius. Maps to --overlay-hint-radius.
cornerShape"round" | "smooth"-Instance corner curve. Omit to inherit --df-corner-shape from the theme (set at create/init).
backgroundstring-Background color. Prefer tokens such as var(--df-neutral-900). Sets --overlay-hint-bg.
borderColorstring-Border color. Prefer tokens such as var(--border). Sets --overlay-hint-border.
foregroundstring-Label color. Prefer tokens such as var(--muted-foreground). Sets --overlay-hint-fg.
shadowstring-Box shadow. Prefer tokens such as var(--overlay-shadow) or none. Sets --overlay-hint-shadow.
blurstring-Backdrop blur length. Prefer tokens such as var(--overlay-blur) or 0px. Sets --overlay-hint-blur.
partsReactNode[]-Label segments joined by separator. Prefer this for multi-part hints. When set, children is ignored.
separatorReactNodeOVERLAY_HINT_SEPARATOR (·)Node between parts. Defaults to the middle-dot constant. Pass a glyph, icon, or custom divider. Set null to omit.
childrenReactNode-Single-label hint. Use parts instead when you need a separator between segments.
leadingReactNode-Optional icon, swatch, or node before the label.
trailingReactNode-Optional icon or node after the label.
classNamestring-Additional styles. On dark canvases without a .dark ancestor, pass className="dark" so default frosted uses the dark recipe.
styleCSSProperties-Inline styles. Override --overlay-hint-bg, --overlay-hint-border, --overlay-hint-fg, --overlay-hint-shadow, --overlay-hint-blur, or --overlay-hint-radius directly.
…HTML attributesHTMLAttributes<HTMLDivElement>-Standard element attributes (id, title, aria-*, etc.).

Exports

Named exports from the Overlay Hint module.

PropTypeDefaultNotes
OverlayHintcomponent-The hint pill component.
OVERLAY_HINT_SEPARATOR"·"-Default middle-dot separator constant. Reuse when you want the stock separator explicitly.
OverlayHintSize"sm" | "md"-Marquee density type. sm is compact; md is the default.
OverlayHintClickTarget"chip" | "action"-Marquee hit target type. chip is the whole hint; action is the trailing control only.

Tokens

Theme defaults live on :root. Override these globally or set the instance vars via props or style.

TokenTypeDefaultNotes
--overlay-hint-radiusCSS lengthvar(--radius-md)Corner radius used by the hint.
--df-corner-shapeCSS corner-shapevar(--df-corner-shape-round)Theme corner curve for all kit chrome. round = circular arcs; smooth = continuous squircle. Set with df-ui init --corner-shape, or override on :root. Default round.
--overlay-hint-bgCSS color-Resolved fill for the active surface.
--overlay-hint-borderCSS color-Resolved border color.
--overlay-hint-fgCSS color-Resolved label color.
--overlay-hint-shadowCSS shadow-Resolved box shadow.
--overlay-hint-blurCSS length-Resolved backdrop blur.
--overlay-hint-default-bgCSS color-Default frosted fill on light surfaces.
--overlay-hint-default-borderCSS color-Default frosted border on light surfaces.
--overlay-hint-default-fgCSS color-Default frosted label on light surfaces.
--overlay-hint-default-shadowCSS shadow-Default frosted shadow on light surfaces.
--overlay-hint-default-blurCSS length-Default frosted blur on light surfaces.
--overlay-hint-default-dark-bgCSS color-Default frosted fill on .dark surfaces.
--overlay-hint-default-dark-borderCSS color-Default frosted border on .dark surfaces.
--overlay-hint-default-dark-fgCSS color-Default frosted label on .dark surfaces.
--overlay-hint-default-dark-shadowCSS shadow-Default frosted shadow on .dark surfaces.
--overlay-hint-default-dark-blurCSS length-Default frosted blur on .dark surfaces.
--overlay-hint-muted-bgCSS color-Muted variant fill.
--overlay-hint-muted-borderCSS color-Muted variant border.
--overlay-hint-muted-fgCSS color-Muted variant label.
--overlay-hint-muted-shadowCSS shadownoneMuted variant shadow.
--overlay-hint-muted-blurCSS length0pxMuted variant blur.
--overlay-hint-marquee-durationCSS time18sOne full marquee loop duration.
--overlay-hint-marquee-widthCSS length12remVisible marquee viewport width.
--overlay-hint-marquee-bgCSS color-Marquee fill on light surfaces.
--overlay-hint-marquee-dark-bgCSS color-Marquee fill on dark surfaces.
--overlay-hint-marquee-gapCSS lengthcalc(4 * var(--spacing-unit))Gap between repeated marquee label segments.
--overlay-hint-marquee-fadeCSS length1.5remSoft edge fade depth for the scrolling label, on both sides.