[SF1] Reveal.js as Lightning Components

A couple weeks back I was at Midwest Dreamin', a great event organized by the regional user and devloper groups. Last year was mostly admin material, but this year they expanded out to developer sessions this year. I had been looking for an excuse to convert some of my existing HTML5 Visualforce demos into Lightning and giving a presentation on doing so seemed like pretty good motivation.

One of my demo was doing the actual presentation using the Reveal.js framework and Lightning. You can download as an unmanaged package to see how it works. A few notes on it:

  1. To create a new presentation, start with the RevealPresentation component and the use RevealSlides to create the actual slides (see HTML5Slides as an example).

  2. If you need to do JavaScript on your actual presentation, set a handler for the RevealLoadedEvent. The HTML5Slides component does this specifically as an example and uses jQuery to change the header of the slides.

  3. This is setup solely as a full screen app via the HTML5Presentation app component - but you could embed it into Salesforce1 with the right interfaces.

  4. Unlike previous Reveal demos, this one is not bound to any data - but there's no reason you couldn't, or mix and match other frameworks like I have in the past. In fact, Lightning's division of labor makes all of the easier to do.

This was the demo that made me really appreciate Lightning. It was very easy to see how things could be componentized while also working together. Nothing here that couldn't (and much of it has been) be done in Visualforce, but Lightning really made it easy to organize and control.

comments powered by Disqus