svelte-typeahead icon indicating copy to clipboard operation
svelte-typeahead copied to clipboard

[question] Is it possible to have typeahead with no css at all? Headless typeahead?

Open fredguth opened this issue 1 year ago • 2 comments

I wasn't able to customize typeahead to remove its background and change the look and feel of the results.

https://svelte.dev/repl/e83817000b5b4aa7bd3a3f83b20256c8?version=3.49.0

I even tried to create a "surrogate" input to input the values, but wasn't able to get the list of results.

fredguth avatar Jul 12 '22 21:07 fredguth

You might need to increase the CSS specifity. Also, data-svelte-typehead is set on the outermost div, not the input.

:global([data-svelte-typeahead] [data-svelte-search] input) {
  background:red;
}

It would be nice if this component was more easily themeable, especially using a Svelte API like style props.

metonym avatar Jul 12 '22 21:07 metonym

I like the idea of a "headless" Typeahead where the logic is shipped standalone.

metonym avatar Jul 12 '22 21:07 metonym