Skip to main content
Modules with no dependencies, in /_sdk/kit/. Import only what you use:
  • createFocus + bindNav: spatial navigation with a controller. Mark what can be reached with data-focus, group rows with data-focus-group (it remembers each group’s last focus) and enclose dialogs with data-focus-trap. The focused element receives the class is-focused.
    • With the mouse: passing over focuses, and leaving removes the class so it does not stay marked. With a controller, the cursor is hidden and :hover does not apply.
    • onChange(el, prev, { pointer }): if pointer is true, focus came from the mouse. In that case do not scroll or select anything, because the element would move out from under the cursor.
  • artFor(game, "portrait" | "square" | "landscape"): art that fits the frame without cropping logos. In square and landscape it composes the game’s background with its logo on top. If something is missing, it falls back to the centered cover, the header, or the name. It returns an element that fills its container.
  • hints(container, [[action, text], …]): the control hint bar.
  • keyed(container, list, key, render): reuses nodes when redrawing, so focus does not jump and it stays fast with hundreds of games.
  • createBackdrop: a background that crossfades between images, with video on top.
  • createGuideView: a game’s Steam community guides, with a list, a reader and controller support, ready to mount in your theme (with /_sdk/kit/guides.css). See Community guides.
  • createHomebrewView: the Homebrew view (emulators and console games, with links to their stores), with a controller and a layout per platform. See Homebrew.
A minimal skeleton: