Convert Figma logo to code with AI

FormidableLabs logospectacle

A React-based library for creating sleek presentations using JSX syntax that gives you the ability to live demo your code.

9,742
691
9,742
74

Top Related Projects

67,545

The HTML Presentation Framework

It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.

12,681

A simple, in-browser, markdown-driven slideshow tool.

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file

11,319

♠️ React MDX-based presentation decks

Quick Overview

Spectacle is a React-based library for creating interactive presentations and slideshows. It provides a flexible and customizable framework for building visually appealing presentations using modern web technologies, allowing developers to create slides with React components and JSX syntax.

Pros

  • Highly customizable and extensible
  • Seamless integration with React ecosystem
  • Support for responsive design and mobile devices
  • Rich set of built-in components and themes

Cons

  • Steeper learning curve for non-React developers
  • Limited export options compared to traditional presentation software
  • May require additional setup for advanced features
  • Performance can be affected with complex animations or large presentations

Code Examples

Creating a basic slide:

import React from 'react';
import { Deck, Slide, Text } from 'spectacle';

const Presentation = () => (
  <Deck>
    <Slide>
      <Text>Hello, Spectacle!</Text>
    </Slide>
  </Deck>
);

Adding multiple elements to a slide:

<Slide>
  <Heading>Welcome to My Presentation</Heading>
  <Text>This is some content for the slide.</Text>
  <Image src="path/to/image.jpg" width={300} />
</Slide>

Using transitions and animations:

<Slide transition={['zoom', 'fade']} transitionDuration={500}>
  <Appear>
    <Text>This text will appear with an animation</Text>
  </Appear>
</Slide>

Getting Started

To start using Spectacle, follow these steps:

  1. Install Spectacle in your React project:

    npm install spectacle
    
  2. Create a new presentation component:

    import React from 'react';
    import { Deck, Slide, Text } from 'spectacle';
    
    const MyPresentation = () => (
      <Deck>
        <Slide>
          <Text>Your first slide</Text>
        </Slide>
        {/* Add more slides here */}
      </Deck>
    );
    
    export default MyPresentation;
    
  3. Render your presentation in your main app:

    import React from 'react';
    import ReactDOM from 'react-dom';
    import MyPresentation from './MyPresentation';
    
    ReactDOM.render(<MyPresentation />, document.getElementById('root'));
    

Competitor Comparisons

67,545

The HTML Presentation Framework

Pros of reveal.js

  • More mature and widely adopted, with a larger community and ecosystem
  • Supports a wider range of export options, including PDF and static HTML
  • Offers more built-in themes and plugins out of the box

Cons of reveal.js

  • Less integration with React ecosystem and components
  • Steeper learning curve for developers primarily working with React
  • More complex setup process for advanced customizations

Code Comparison

reveal.js:

<div class="reveal">
  <div class="slides">
    <section>Slide 1</section>
    <section>Slide 2</section>
  </div>
</div>

Spectacle:

<Deck>
  <Slide>Slide 1</Slide>
  <Slide>Slide 2</Slide>
</Deck>

Summary

reveal.js is a more established and feature-rich presentation framework with broader export options and a larger ecosystem. However, it may be less appealing to developers deeply invested in the React ecosystem. Spectacle, on the other hand, offers tighter React integration and a more familiar development experience for React developers, but with a smaller community and fewer built-in features. The choice between the two largely depends on the developer's preferred tech stack and specific presentation requirements.

It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.

Pros of impress.js

  • More creative freedom with 3D transformations and transitions
  • Lightweight and doesn't require React
  • Supports a wider range of browsers, including older versions

Cons of impress.js

  • Steeper learning curve, especially for complex presentations
  • Less structured approach, which can lead to inconsistent designs
  • Fewer built-in components and themes compared to Spectacle

Code Comparison

impress.js:

<div id="impress">
    <div class="step" data-x="0" data-y="0">Slide 1</div>
    <div class="step" data-x="1000" data-y="500" data-scale="2">Slide 2</div>
</div>

Spectacle:

<Deck>
  <Slide>
    <Text>Slide 1</Text>
  </Slide>
  <Slide>
    <Text>Slide 2</Text>
  </Slide>
</Deck>

Key Differences

  • impress.js uses HTML and CSS for slide creation, while Spectacle uses React components
  • impress.js offers more control over slide positioning and transitions
  • Spectacle provides a more structured and consistent approach to presentation design
  • impress.js is better suited for unique, creative presentations, while Spectacle excels in creating professional, standardized slideshows
12,681

A simple, in-browser, markdown-driven slideshow tool.

Pros of remark

  • Simpler and more lightweight, with a focus on Markdown-based presentations
  • Supports a wider range of output formats, including HTML, PDF, and even self-contained HTML files
  • Has a larger ecosystem of plugins and themes

Cons of remark

  • Less feature-rich out of the box compared to Spectacle
  • Requires more manual setup and configuration for advanced features
  • Limited built-in support for complex animations and transitions

Code Comparison

remark:

var slideshow = remark.create({
  source: "# My Presentation\n\n---\n\n## Slide 1\n\nContent here"
});

Spectacle:

import { Deck, Slide, Text } from 'spectacle';

const Presentation = () => (
  <Deck>
    <Slide>
      <Text>My Presentation</Text>
    </Slide>
  </Deck>
);

Both remark and Spectacle are popular presentation frameworks, but they cater to different needs. remark is more suited for developers who prefer working with Markdown and want a lightweight solution. Spectacle, on the other hand, offers a more robust React-based approach with built-in components and styling options. The choice between the two depends on the specific requirements of your presentation and your preferred development workflow.

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file

Pros of reveal-md

  • Simpler setup and usage, ideal for quick Markdown-based presentations
  • Built-in server for live previewing and auto-reloading
  • Supports exporting to PDF and static HTML

Cons of reveal-md

  • Less customizable than Spectacle
  • Limited to Markdown syntax for content creation
  • Fewer built-in themes and design options

Code Comparison

reveal-md:

# Title Slide

---

## Second Slide

- Bullet point 1
- Bullet point 2

---

### Third Slide

Content here

Spectacle:

import { Deck, Slide, Heading, UnorderedList, ListItem } from 'spectacle';

export default () => (
  <Deck>
    <Slide>
      <Heading>Title Slide</Heading>
    </Slide>
    <Slide>
      <Heading>Second Slide</Heading>
      <UnorderedList>
        <ListItem>Bullet point 1</ListItem>
        <ListItem>Bullet point 2</ListItem>
      </UnorderedList>
    </Slide>
  </Deck>
);

reveal-md uses simple Markdown syntax for creating slides, while Spectacle employs React components for more complex and customizable presentations. reveal-md is easier to get started with, but Spectacle offers greater flexibility and control over the presentation's structure and design.

11,319

♠️ React MDX-based presentation decks

Pros of mdx-deck

  • Simpler syntax using MDX (Markdown + JSX) for creating slides
  • Easier to integrate custom React components into presentations
  • Lightweight and faster to set up for quick presentations

Cons of mdx-deck

  • Less built-in theming options compared to Spectacle
  • Fewer animation and transition effects out of the box
  • Limited layout customization without additional CSS

Code Comparison

mdx-deck:

import { Head, Notes } from 'mdx-deck'

# My Presentation

---

## Slide 2

<Notes>Speaker notes go here</Notes>

---

<MyCustomComponent />

Spectacle:

import { Deck, Slide, Heading, Text } from 'spectacle';

export default () => (
  <Deck>
    <Slide>
      <Heading>My Presentation</Heading>
    </Slide>
    <Slide>
      <Text>Slide 2</Text>
    </Slide>
  </Deck>
);

Both libraries offer React-based solutions for creating presentations, but mdx-deck focuses on simplicity and MDX integration, while Spectacle provides more robust features and customization options. The choice between them depends on the complexity of the presentation and the developer's familiarity with React and MDX.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Spectacle

✨ A ReactJS based Presentation Library ✨

Maintenance Status

Getting Started

Welcome to our monorepo project, housing the core spectacle package and related tools and examples.

Come learn more at our docs site!

Support

Have a question about Spectacle? Submit an issue in this repository using the "Question" template.

Notice something inaccurate or confusing? Feel free to open an issue or make a pull request to help improve the documentation for everyone!

The source for our docs site lives in this repo in the docs folder.

Contributing

Please see our contributing guide.

Maintenance Status

Active: Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.

NPM DownloadsLast 30 Days