• Stars
    star
    229
  • Rank 174,009 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Beautiful Minimalist React & MDX Presentations

ReMDX

Create beautiful minimalist presentations with React & MDX.

Setup

npm init remdx

And:

npm run dev

Custom Setup

See the Example Deck to get started with adding ReMDX to your project:

npm add @nkzw/remdx @nkzw/vite-plugin-remdx

vite.config.js:

import remdx from '@nkzw/vite-plugin-remdx';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [remdx(), react()],
});

index.html:

<div id="app"></div>
<script type="module">
  import '@nkzw/remdx/style.css';
  import { render } from '@nkzw/remdx';

  render(document.getElementById('app'), import('./slides.re.mdx'));
</script>

Then create your slides.re.mdx and start the dev server via npx run vite dev.

Usage

  • Individual slides are separated by three dashes: ---.
  • Front matter blocks can be inserted at the top of a slide and separated from the slide content by two dashes: --. The theme can be set via theme: <name>, and background images can be set via image: <url>, referring to images in the public/ folder.
  • You can export a set of HTML and custom components using export { Components } from './Components'. The Components.tsx file should export an object with component names mapping to their implementation as default export.
  • ReMDX provides a default theme, but you can leave it out and bring your own or customize styles via
  • Code blocks are styled via shiki-twoslash and support syntax highlighting via CSS variables.
  • The inbuilt image component used for inline images via Markdown syntax (for example: ![Tokyo in the Dark](dark.jpg?height=60vh&borderRadius=20px)) can be styled by passing CSS properties to the query string.

Context & Decisions

Prior Art

ReMDX was inspired by:

The core of ReMDX is a lean fork of Spectacle. create-remdx is based on Slidev. I'd like to thank the authors of the above tools for their awesome work.

Why ReMDX?

All three of the above solutions fall short in some way. Some are a bit outdated, and some have too much cruft or are slow. Slidev is modern but only works with Vue instead of React. I wanted to build a fast MDX-based slide deck tool on top of Vite that uses React and only supports a minimal set of features.

ReMDX does not have feature XYZ

Fork it, build it, and submit a PR.

Opinions

  • Basics: React + Markdown together is a great way to make technical JavaScript presentations.
  • Minimal: ReMDX has few features. If you'd like to add new features, please fork it and consider sending a Pull Request.
  • Composable: ReMDX doesn't box you in. Bring your design system or use Tailwind to lay out your slides.

More Repositories

1

js-codemod

Codemod scripts to transform code to next generation JS
JavaScript
1,214
star
2

vite-ts-react-tailwind-template

Minimal, sensible defaults, fast.
TypeScript
544
star
3

mootools-mobile

Makes your web applications more touching.
JavaScript
131
star
4

pyjest

Example Jest runner for Python
JavaScript
83
star
5

mootools-filemanager

A filemanager for the web based on MooTools that allows you to (pre)view, upload and modify files and folders via the browser.
PHP
83
star
6

eslint-config

Opinionated ESLint config with sensible defaults.
JavaScript
63
star
7

PowerTools

A powerful! collection of low-level plugins for MooTools
Shell
57
star
8

palette-swap

Image palette swapping and color replacement tool based on canvas for Node.js and browsers.
TypeScript
56
star
9

mootools-history

History Management via popstate or hashchange.
JavaScript
56
star
10

dotfiles

My dotfiles and VS Code setup.
Shell
46
star
11

licht-theme

A comfortable light theme for VS Code, SublimeText, Atom and TextMate.
Less
39
star
12

copy-as-markdown

A React hook to copy text as Markdown.
TypeScript
38
star
13

mootools-tree

MooTools powered Tree Components: Sortable Tree + Expand/Collapse Functionality
JavaScript
36
star
14

profane

Zero dependency profanity detector.
TypeScript
30
star
15

best-test-framework

The best test framework.
JavaScript
27
star
16

jest-bundler

The famous jest-bundler.
JavaScript
21
star
17

safe-word-list

A word list of the most common safe English words.
JavaScript
19
star
18

php-type

Types! For PHP. Like JavaScript
PHP
17
star
19

php-cache

May the cache be with you
PHP
15
star
20

scroll-loader

Loads additional content on a website when a user reaches the end of the page.
JavaScript
14
star
21

mootools-class-extras

Provides useful additions to Class
JavaScript
13
star
22

mootools-form-autogrow

Automatically resizes textareas based on their content.
JavaScript
10
star
23

mootools-interface

Interfaces. In JavaScript.
JavaScript
9
star
24

mootools-custom-event

Allows to create custom events based on other custom events.
JavaScript
7
star
25

posts

A space for discussing posts on cpojer.net.
6
star
26

mootools-form-placeholder

Provides a fallback for the placeholder property on input elements for older browsers.
JavaScript
5
star
27

mootools-dynamic-matcher

Searches elements via complex selectors and executes functions on them.
JavaScript
4
star
28

mootools-router

Router for client side web apps based on CrossroadsJS (http://millermedeiros.github.com/crossroads.js), adapted to MooTools.
JavaScript
3
star
29

mootilities

A few very simple and experimental MooTools gems to ease web app development.
JavaScript
2
star
30

dunkel-theme

A comfortable high-contrast dark theme for VS Code.
2
star
31

eslint-plugin

ESLint plugins for Nakazawa Tech.
JavaScript
1
star
32

cpojer

1
star
33

event-stack

Helps you Escape.
JavaScript
1
star
34

agent-conf-2023

People of Agent Conf 2023
HTML
1
star
35

tsurukame

Objective-C
1
star