Stage Fright is a JavaScript powered presentation framework
Stage Fright takes inspiration from Flowtime.js and reveal.js
It's tiny, about 14KB minified and around 4KB gzipped
It supports fragments and comes with a nifty minimap that shows presentation progress
If there are fragments remaining on a slide, the slide in the minimap will be greyed out until all fragments are shown
This is the last fragment on the slide
It even supports Speaker Notes (press s
to start them up)
The markup is designed to be semantic
A vertical grouping of slides is a ._stage--group
. While marked up with
an article
, they are referred to as your presentation's Sections
<article class="_stage--group">
<!-- Slides Will Go Here -->
</article>
Each slide is a section
inside the article, with a
._stage--content
class. Inside is the content wrapper,
._stage--content
.
Notes can be added by including an aside
with the
._stage--notes
class as a sibling of the content
<section class="_stage--slide">
<div class="_stage--content">
<!-- Slides Content Goes Here -->
</div>
<aside class="_stage--notes">
<!-- Slide Notes Go Here -->
</aside>
</section>
Installing and using is fairly straight-forward using modern tooling
$ npm install stage-fright
Stage Fright is written using ES Module syntax, and therefore can be imported using your favorite bundler as follows:
import 'stage-fright';
Styling is distributed as an Eyeglass module for Sass. Presuming that is all set up, you can import Stage Fright's styling in to your project as follows:
@import 'stage-fright';
There are five Sass variables you can set before importing Stage Fright that will automatically style your deck:
You can configure how Stage Fright works by changing its import slightly
import stageFright from 'stage-fright';
Then, initialize Stage Fright with an object of your configuration
stageFright({ options });
All configurations can be set to true
to enable, false
to
disable, 'alt'
to enable but require the alt key pressed,
'ctrl'
to enable but require the control key pressed, or
meta
to enable but require the meta key (Windows/command) pressed. All
default to true
Available configuration options are:
- navigation.arrows - Use arrow keys for navigation
- navigation.remote - Use Page Up/Page Down keys for previous/next navigation (used by handheld presentation remotes)
- navigation.spacebar - Use Spacebar/Shift + Spacebar for previous/next navigation
- notes - Use s key to open speaker notes