CSSScript.com Demo Page

rich-input Web Component Demos

Download Back To CSSScript.Com

Keyword autocomplete, structured query parsing, native form behavior, and live in-input highlights in one familiar <input> surface.

Source npm no build / direct HTML
01 / live surface

Search canvas

autocomplete + highlights
Music catalog query

Type a keyword or keep writing naturally

Try la, label:"K, or use the arrow keys to move through suggestions.

ready
Presets
Public methods Enter search   Esc close suggestions
Runtime OpaqueRange Custom Highlights Fallback
02 / live data

Query inspector

getParsedQuery()
Structured output

Tokens and query shape

0 tokens
Free text --
Configured keys 0
Caret index 0
Selection 0:0

        
Bubbles + composed

Event stream

  1. Interact with the input to record input, change, search, and selection events.
03 / integration lab

Forms and live configuration

ElementInternals + MutationObserver
Form-associated custom element

Submit a native form

name="query"
Waiting for submit
Declarative configuration

Add a filter at runtime

1 datalist
Configured from one datalist

Add the filter, then type tempo: to open the new suggestions.

04 / surface details

States, parts, and slots

disabled + readonly + ::part
Native input states

Same component, different constraints

Disabled disabled
Read only readonly
Empty focus + clear
Shadow DOM styling

Custom parts and leading content

themed instance
trailing slot
::part(control) ::part(input) ::part(popover) ::part(suggestion-item-active)