Ytils Yupput documentation

Version 0.12

Instantiating Yupput

The Yupput constructor takes three parameters:

  1. values - An array of objects that represent the items that can be searched within your Yupput dialogue.
  2. callback - The callback that will be fired when a selection is made on an active dialogue.
  3. config - The configuration options, an empty object can be passed in as well.


Parameter Type Description
values YupputItem[] Array of object values representing a searchable item on the Yupput dialogue.
inputCallback function The function that is being called when a Yupput item is being selected by click or enter.
config object The configuration object.
Type definition YupputItem
Parameter Type Description
.headline string The main headline text for one Yupput item.
.metaData string This represents the text below the headline of one Yupput item.
.thumbnail string (Optional) URL to a (thumbnail) on the left of one Yupput item.
.value string The value or id that represents the selected Yupput item.
Type definition inputCallback
Parameter Type Description
selectedYupputItem YupputItem The chosen YupputItem object by the user, see documentation above.
inputValue string The value typed in by the user used for filtering the YupputItems.
Type definition config
Yupput config options