Tridi v2 — Keyboard support

Looking for older version? Read Tridi v1 documentation here

Tridi offers an option to rotate images with keyboard arrows. To enable this set keys option to true.

Once done, Tridi will react to and keys when focused.

Options

  • keys (boolean) — enables / disables keyboard events. Optional, defaults to false
  • focusOnHintClose (boolean) — when set to true, Tridi will automatically set focus on main image once hint on startup is closed

Code

HTML

<div id="tridi-keys"></div>

JavaScript

const tridiInstance = Tridi.create({
  element: '#tridi-keys',
  location: './path/to/image/folder',
  format: 'jpg',
  count: 36,
  keys: true
});

tridiInstance.load();

« Back to main page