npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reslide-dev/mdx

v0.16.0

Published

Remark/rehype plugins for reslide MDX preprocessing

Readme

reslide

npm version license

React + MDX ベースのプレゼンテーションフレームワーク。

Markdown でスライドを書き、React コンポーネントを自由に埋め込める。Next.js / Remix / Vite 等あらゆる React プロジェクトで動作するフレームワーク非依存設計。

特徴

  • MDX でスライドを記述 --- --- で区切るだけでスライドに
  • フレームワーク非依存 --- 純粋な React コンポーネント、どの React プロジェクトにも組み込み可能
  • 1920x1080 デザイン解像度 --- Full HD ベースのスライド設計、designWidth / designHeight props で上書き可能
  • 16:9 レスポンシブ --- 固定アスペクト比で自動スケーリング、PC でもスマホでも同じレイアウト
  • タッチスワイプ --- モバイルでスワイプ操作によるスライド送り・戻し
  • 豊富なレイアウト --- default / center / two-cols / image-right / section / quote / grid / none
  • カラム比率 --- two-colscols: 6/4 による非対称分割、image-rightimageWidth: 40%
  • クリックアニメーション --- ::click{animation=slide-up} で fade / slide-up / slide-left / scale / none
  • テキストハイライト --- :highlight-yellow[text] / :underline-blue[text] / :circle-red[text]
  • KaTeX 数式 --- $E = mc^2$ でインライン、$$...$$ でディスプレイ数式
  • Mermaid ダイアグラム --- <Mermaid> コンポーネントでフローチャート等を描画
  • Shiki コードハイライト --- ビルド時に美しい構文ハイライトを適用、テーマ変更可能
  • プレゼンターモード --- 別ウィンドウでノート・タイマー・次スライドプレビュー表示、双方向操作対応
  • ポインターモード --- クリックでリップルエフェクト付きの視覚ポインター
  • 描画モード --- フリーハンド注釈をスライドごとに保持
  • トランジション --- fade / slide-left / slide-right / slide-up / slide-down / zoom / cover / reveal
  • 概要モード --- サムネイルグリッドでスライド一覧を表示
  • PDF エクスポート --- Ctrl+P で印刷 / PDF 保存
  • テーマ --- CSS 変数ベース、default / dark / bare(最小限)テーマ同梱
  • スライドごとのテーマ切替 --- vars frontmatter で CSS 変数をスライド単位で上書き
  • 背景カスタマイズ --- background frontmatter でスライドごとに背景色・画像・グラデーション
  • スライドナンバー制御 --- slideNumbers props で表示 / 非表示 / 最初のスライド除外
  • GlobalLayer 制御 --- excludeSlides / from / to で表示範囲指定
  • カスタムページナンバー --- <SlideIndex /> / <TotalSlides /> で自由な位置にページ番号配置

クイックスタート

npm install @reslide-dev/core @reslide-dev/mdx

1. スライドを書く

---
layout: center
---

# Hello reslide

React + MDX のプレゼンテーション

---

## 特徴

::click

- 段階的に表示される項目

::click

- もう一つの項目

---

---

## layout: two-cols

## 左カラム

コード例やテキスト

<SlotRight>

## 右カラム

画像やリストなど

</SlotRight>

2. レンダリング

import { reslideComponents } from "@reslide-dev/core/mdx-components";
import Slides from "./slides.mdx";

import "@reslide-dev/core/themes/default.css";
import "@reslide-dev/core/transitions.css";

export default function App() {
  return (
    <div style={{ width: "100vw", height: "100dvh" }}>
      <Slides components={reslideComponents} />
    </div>
  );
}

3. Vite の設定(MDX プラグイン)

import mdx from "@mdx-js/rollup";
import { remarkSlides, remarkClick, remarkMark } from "@reslide-dev/mdx";
import remarkDirective from "remark-directive";

export default {
  plugins: [
    mdx({
      remarkPlugins: [remarkDirective, remarkSlides, remarkClick, remarkMark],
    }),
  ],
};

キーボードショートカット

| キー | 機能 | | -------- | -------------------------- | | ← → | スライド移動 | | Space | 次のクリック / スライド | | Escape | 概要モード | | f | フルスクリーン | | p | プレゼンターウィンドウ | | d | 描画モード | | q | ポインターモード | | c | 描画クリア(描画モード中) |

画面の左端 / 右端クリック、タッチスワイプでもスライド送り・戻しが可能。

レイアウト

MDX のフロントマターで layout を指定:

---
layout: center
---

| レイアウト | 説明 | | ------------- | --------------------------------------------------------- | | default | 標準(左上寄せ) | | center | 中央寄せ | | two-cols | 2カラム(<SlotRight> で右カラム、cols: 6/4 で比率) | | image-right | 左テキスト + 右画像(imageWidth: 40% で幅指定) | | image-left | 左画像 + 右テキスト(imageWidth: 40% で幅指定) | | section | セクション区切り(アクセントカラー背景) | | quote | 引用 | | grid | CSS Grid(grid: "1fr 1fr 1fr" / rows: 2 / gap: 40) | | none | フルコントロール(padding/flex なし、absolute配置向け) |

カスタムコンポーネント

MDX の components prop で任意の React コンポーネントを渡せる:

const components = {
  ...reslideComponents,
  Speaker: ({ name, avatar }) => (
    <div style={{ display: "flex", gap: "1rem", alignItems: "center" }}>
      <img src={avatar} style={{ width: 64, borderRadius: "50%" }} />
      <span>{name}</span>
    </div>
  ),
};

<Slides components={components} />;

MDX 内で直接使用可能:

<Speaker name="田中太郎" avatar="/tanaka.jpg" />

テーマ

CSS 変数でカスタマイズ可能:

:root {
  --slide-bg: #ffffff;
  --slide-text: #1a1a1a;
  --slide-accent: #16a34a;
  --slide-section-text: #ffffff;
  --slide-font-family: "Noto Sans CJK JP", system-ui, sans-serif;
  --slide-progress: #16a34a;
  --slide-progress-height: 3px;
}

同梱テーマ:

  • @reslide-dev/core/themes/default.css --- 標準テーマ(Inter フォント、装飾スタイル付き)
  • @reslide-dev/core/themes/dark.css --- ダークテーマ
  • @reslide-dev/core/themes/bare.css --- 最小限テーマ(CSS変数のみ、カスタムデザイン向け)

スライドごとに CSS 変数を上書き:

---
layout: center
vars: slide-bg:#0f172a,slide-text:#e2e8f0,slide-accent:#60a5fa
---

# ダークなセクションスライド

パッケージ構成

| パッケージ | 役割 | | ------------------------------------ | ------------------------------------------------------------ | | @reslide-dev/core | React コンポーネント(Deck, Slide, Click, Mark, Notes 等) | | @reslide-dev/mdx | remark/rehype プラグイン(スライド分割、ディレクティブ変換) | | @reslide-dev/cli | Vite ベースの dev/build CLI |

開発

vp install          # 依存インストール
vp dev              # 開発サーバー
vp test             # テスト実行
vp check            # lint + format + 型チェック
vp run ready        # 全チェック(fmt, build, lint, test)

ライセンス

MIT