Below is a set of live examples of TeSS widgets, with the code for each displayed below.
To use a widget, simply copy and paste the entire code block into your HTML document, and tweak the parameters as needed.
Each widget is instantiated like so:
TessWidget.Events(element, renderer, { opts: { ... }, params: { ... } })
element -
An HTMLElement object into which the widget will be renderered.
renderer -
The type of widget to be displayed, either one of the presets (as seen in the examples below) or a
custom renderer object.
opts -
A set of options to pass to the renderer (varies depending on the renderer).
params -
Pre-applied filters/sorting that will be applied to the events or materials.
For a reference on which filters can be applied, see
here for events and
here for materials.
baseUrl (optional) -
The base URL of the TeSS instance to use. Defaults to https://tess.elixir-europe.org/.
instanceName (optional) -
The name of the TeSS instance to use. Defaults to "TeSS".
emptyText (optional) -
Text to display if no resources are found. Defaults to "Nothing found".