Lookup Docs

DocsWidget

Match your design system with a few CSS variables. On pages with shadcn/ui-style tokens, it matches with no setup.

The widget reads its own --hmc-* CSS variables. When one isn't set, it falls back to the shadcn/ui token names (--background, --foreground, --accent, --border, --radius and so on), the same names Sensible UI by Cam Pak uses. So on those pages it matches with no setup. Anywhere else, set a few variables.

Try it below. The right side has no Lookup CSS at all, only the page's tokens. Pick a set, edit any value or paste a theme from ui.shadcn.com/themes, then drag across to compare it with no tokens.

no tokens
your tokens
your page's tokens

Variables

VariableFalls back toUsed for
--hmc-bg--backgroundThe input background
--hmc-text--foregroundText
--hmc-popover, --hmc-popover-text--popover, --popover-foregroundThe results list
--hmc-border--borderThe results list border
--hmc-input-border--inputThe input border
--hmc-accent--ringFocus ring and icons
--hmc-active-bg, --hmc-active-text--accent, --accent-foregroundThe highlighted result
--hmc-muted--muted-foregroundSecondary text
--hmc-radius--radiusCorners
--hmc-zThe results list's z-index. Defaults to 1000.

The widget also takes your page's font. Rows are compact by default; density="comfortable" makes them taller with larger icons.

Parts

For anything else, style its parts with ::part(), such as church-lookup::part(option-name) { font-weight: 500 }.

PartWhat it is
label, input, clearThe label, the search box and its clear button
popup, listboxThe results panel and the list inside it
optionEach result row
option-name, option-detail, option-distanceA result's name, its address line and its distance
moreThe Show more row
correctedThe "Showing results for" line above corrected results
note, retryThe no-results or error message, and its Try again button
footerThe data credit under the results
consentThe panel that offers to share fixes back

Want to see it fill a real form? Open the full theming example.

esc

Ask AI

Answers come from these docs, written by an AI model on Cloudflare Workers AI. Check anything important against the linked page.