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

@gendive/react-notion-renderer

v0.1.3

Published

Notion 페이지/데이터베이스를 React에서 렌더링하는 라이브러리

Readme

@gendive/react-notion-renderer

한국어 | English

A React library for rendering Notion pages and databases as beautiful dashboards.

MIT License npm version

📚 Documentation

Screenshot


Why we built this

While building DevDive, we wanted to use Notion as a dashboard. We needed to manage content in Notion and display it as beautiful card views or tables on our website.

Existing libraries didn't quite fit:

  • Relied on unofficial APIs
  • Hard to customize styles
  • Couldn't render databases as cards/boards

So we built our own. A library that uses only the official Notion API, is easy to customize, and renders databases like dashboards.

This library is built by the Gendive team. We also run DevDive, a platform to easily combine and use AI models. Check it out! 🙏


⭐ Give us a Star!

If this library helped you, please star this repo on GitHub!

Your star means a lot to us:

  • Motivates us to build more features
  • Helps other developers discover this library
  • Contributes to the open source ecosystem

Features

Page Rendering

  • ✅ Notion API integration (fetchNotionPage)
  • ✅ Multiple block types (paragraph, heading, quote, code, callout, divider, list)
  • ✅ Rich text styling (bold, italic, underline, strikethrough, code, link, color)
  • ✅ Theme system (light/dark mode)

Database Rendering

  • ✅ Notion API integration (fetchNotionDatabase)
  • ✅ Multiple property types (title, rich_text, select, multi_select, status, number, date, checkbox, files, last_edited_time)
  • ✅ 3 layout options
    • Table: Traditional table view
    • Board Card: Card grid view (with cover images)
    • List: List view (with thumbnails)

Advanced Features

  • Column selection: Control visible columns with visibleColumns / hiddenColumns
  • Filtering: Notion API filter support (status, select, checkbox, number, date, text, etc.)
  • Sorting: Single/multi-column sorting
  • Theme customization: Fine-grained control over colors, spacing, shadows
  • Click events: onRowClick for card click handling
  • Modal component: NotionPageModal for displaying page details

Installation

npm install @gendive/react-notion-renderer

Quick Start

1. Environment Variables

NOTION_TOKEN=secret_xxx...
NOTION_PAGE_ID=xxx...
NOTION_DATABASE_ID=xxx...

2. Page Rendering

import { NotionThemeProvider } from '@gendive/react-notion-renderer';
import NotionPageById from '@/components/NotionPageById';

export default function Page() {
  return (
    <NotionThemeProvider>
      <NotionPageById pageId={process.env.NOTION_PAGE_ID!} />
    </NotionThemeProvider>
  );
}

3. Database Rendering

Table View

<NotionDatabaseById
  databaseId={databaseId}
  layout="table"
  visibleColumns={['Title', 'Status', 'Date']}
/>

Board Card View

<NotionDatabaseById
  databaseId={databaseId}
  layout="board-card"
  cardOptions={{
    showCover: true,
    fullWidth: true,
    columns: 3,
    pagination: {
      enabled: true,
      pageSize: 12,
    },
    cardTheme: {
      cardBackground: '#020617',
      cardBorderColor: '#1f2937',
      titleColor: '#e5e7eb',
    },
  }}
/>

List View

<NotionDatabaseById
  databaseId={databaseId}
  layout="list"
  cardOptions={{
    showCover: true,
    thumbnailPosition: 'right',
    cardTheme: {
      cardBackground: '#ffffff',
      cardBorderColor: '#e5e7eb',
      cardRadius: 12,
    },
    listStyle: {
      thumbnailWidth: 180,
      thumbnailHeight: 100,
      contentPadding: 20,
      gap: 20,
      titleSize: '1.25rem',
    },
  }}
/>

4. Page Detail Modal

Important: Notion API cannot be called directly from the browser (CORS). Use the API Route provided by the library.

1. Create API Route (app/api/notion/page/[pageId]/route.ts)

export { GET } from '@gendive/react-notion-renderer/api';

2. Client Component

"use client";

import { useState } from 'react';
import {
    NotionDatabaseRenderer,
    NotionPageModal
} from '@gendive/react-notion-renderer';
import { fetchNotionPageClient } from '@gendive/react-notion-renderer/client';

export default function DatabaseWithModal({ database }) {
    const [selectedPageId, setSelectedPageId] = useState(null);

    return (
        <>
            <NotionDatabaseRenderer
                database={database}
                layout="board-card"
                onRowClick={(pageId) => setSelectedPageId(pageId)}
            />

            <NotionPageModal
                pageId={selectedPageId}
                onClose={() => setSelectedPageId(null)}
                fetchPage={fetchNotionPageClient}
            />
        </>
    );
}

5. Filtering and Sorting

<NotionDatabaseById
  databaseId={databaseId}
  layout="board-card"
  queryOptions={{
    filters: [
      {
        property: 'Status',
        type: 'status',
        condition: 'equals',
        value: 'In Progress',
      },
    ],
    sorts: [
      {
        property: 'Priority',
        direction: 'ascending',
      },
    ],
  }}
/>

API Reference

See Documentation for full API reference.

License

MIT License © 2025 Gendive

The Gendive team has decided to release this repository under the MIT license to contribute to the open source community.

We would like to express our gratitude to all the Gendive team members and developers who made this possible. Thank you! 💙

Free to use, modify, and distribute. See LICENSE for details.