All the search options
Every option ScriptureTips.search takes. The element options give the search a place on the page: use element, or input and results together.
| Option | Does |
|---|---|
element | The container that gets the field with its results under it. |
input, results | The field and the results in two elements. |
translations | Translations to search, by id, in order of preference. Only those that may be shown on other sites are searched. About Widget Translations |
kinds | reference, text, original. |
limit | Verses fetched at a time, up to 50. |
more | scroll (default), button (a Show more button) or none: how a long list of results goes on. |
placeholder | Words in the empty field. |
suggest | Suggestions as the visitor types. On unless false. |
searchOnType | Search as typing pauses, instead of waiting for Enter. Off by default (data-search-on-type="true" in markup). |
onSelect | What picking a result does, instead of opening the reader (more). |
strings | Replace any of the search's words, to translate them. |
name | The search's name for ScriptureTipsSearch.get(name). |
api | The data server's API; where the script came from if left out. |
Matching your site's look
The search and the reader take the same CSS variables as the passage tooltip (--st-accent, --st-ink, --st-muted, --st-rule, --st-paper, --st-radius, --st-font), and --st-search-hit for matched words. Matching your site's look has the table and an example.
What it sends
Only the words typed and the passages picked, to the data server, with no cookies and nothing stored in the visitor's browser. Allow the data server in your content security policy's script-src and connect-src.