Skip to content
vviinn DocsDocs Beta

Search Bar (vviinn-text-search)

Generated from vviinn-widgets 2.228.0, the latest release when these docs were built. If you pin an older version, some of these may not be in it yet — check the Changelog.

Try the properties live in the Playground.

Set them as HTML attributes.

api-path

API endpoint URL (optional, defaults to production)

Type: string

auto-suggest-show

Show auto-suggest dropdown with search completions

Type: boolean · Default: true

css-url

URL to external CSS file for custom styling of the visual search modal

Type: string

example-image-source

Example image shown in the visual search modal

Type: string

locale

Locale for text localization

Type: "de-DE" | "en-US"

mode

Basic or extended text search with search modal and speech recognition

Type: "basic" | "extended" · Default: "basic"

placeholder

Custom placeholder for the text search input

Type: string · Default: ""

results-page-params

Custom URL param names for results page redirect. Default: "query=query&searchId=searchId".

Type: string

results-page-url

URL of the results page for automatic search redirect.

Type: string

search-query

Query for the text search passed from widget

Type: string

token

Vviinn customer's token (required)

Type: string

use-drag-and-drop

Accept image files dropped from the OS onto the upload button (desktop only)

Type: boolean · Default: false

visual-search-mode

Visual search modal mode (modal/camera/upload)

Type: "camera" | "modal" | "upload"

Listen with document.addEventListener(). The pages under Events describe the data each event carries.

EventDescription
vviinnFilterTriggeredA filter was triggered
vviinnImageUploadFinishedAn image search ID was received (used by vviinn-results component)
vviinnNoResultTriggered when a text search request fails
vviinnRedirectA redirect URL is received from the API (can be intercepted by client)

Replace texts and icons with your own content: Replace Widget Content.

SlotDescription
vviinn-camera-button-text-startTitle of Start Camera button in the search modal.
vviinn-camera-button-text-stopTitle of Stop Camera button in the search modal.
vviinn-camera-iconIcon of Camera Button in the search modal.
vviinn-image-search-modal-titleSearch modal title.
vviinn-image-upload-button-textTitle of Upload Button in the search modal.
vviinn-image-upload-iconIcon of Upload Button in the search modal.
vviinn-privacy-badge-textText content of privacy notification in the search modal.
vviinn-teaser-textText on the search modal's main screen.
vviinn-text-search-actionsAdditional actions for the text search block, e.g., a button to open the Search Modal.
vviinn-text-search-iconIcon of the text search block.

Style these elements with vviinn-text-search::part(name): Styling Specific Elements.

PartDescription
close-buttonClose Button in the search modal's header.
secondary-actionBack Button in the search modal's header.
speech-buttonSpeech recognition button.
start-camera_buttonStart Camera Button in the search modal.
suggestion-itemIndividual auto-suggest item.
suggestions-containerAuto-suggest dropdown container.
text-search-buttonText search input's search button.
text-search-containerContainer for the text search block.
text-search-inputText search input.
text-search-tooltipText search tooltip.
upload-photo_buttonUpload Photo Button in the search modal.
vviinn-buttonVisual search button element in the search bar (extended mode).

Set them on vviinn-text-search or a parent element: CSS Variables.

PropertyDescription
--font-familyThe font family of the text search.