发布于: 2024-6-7最后更新: 2024-9-9字数 00 分钟

type
status
date
slug
summary
tags
category
icon
url
sync
Summary
react-notion-x is a fast and accurate React renderer for displaying Notion page content. It offers TypeScript support and is compatible with frameworks such as Next.js, create-react-app, and Gatsby. The library supports a variety of Notion block types and collection views, boasts high performance, and has excellent Lighthouse scores. Additionally, it supports the lazy loading of optional components to keep the initial page bundle lightweight.

Features

  • Project Features: react-notion-x provides a simple, fast, and well-tested solution for rendering Notion pages, supports TypeScript, and is compatible with various React frameworks.
  • Usage Guide: Developers first need to obtain page data through the NotionAPI, then use the NotionRenderer component to render the page content.
  • Styling Guide: To ensure correct page display, it is necessary to import the core CSS styles, and you can also import styles for code highlighting and formula rendering as needed.
  • Optional Components: The library does not include some larger components by default, such as PDF previews and collection views, which can be dynamically imported and loaded on demand.
  • Private Page Access: Private Notion pages can be accessed by passing authToken and activeUser, which can be obtained from the browser's cookies.
  • Next.js Example: Provides a Next.js example project, demonstrating how to use react-notion-x for rendering within a page.
  • Performance Optimization: react-notion-x supports lazy loading of images and low-quality image placeholder previews, as well as using CDN caching to improve loading speed.
  • Supported Block Types: The library supports most Notion block types and collection views, but some specific views like calendar views are not yet supported.

Loading...
Notion Icons | 3100+ Notion-style Illustrations, Icons and Wallpapers

Notion Icons | 3100+ Notion-style Illustrations, Icons and Wallpapers

Has icons, illustrations, and wallpapers, in Notion style.


notion-sdk-php

notion-sdk-php

A PHP library for the official Notion API.