Skip to Content
文档

散文

用于设置远程 HTML 内容的样式

Title Heading 1

Title Heading 2

Title Heading 3

Title Heading 4

Title Heading 4 testing

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi at dolor nec ex rutrum semper. Praesent ultricies purus eget lectus tristique egestas ac in lacus. Nulla eleifend lorem risus, sit amet dictum nisi gravida eget. Suspendisse odio sem, scelerisque congue luctus nec, scelerisque ultrices orci. Praesent tincidunt, risus ut commodo cursus, ligula orci tristique justo, vitae sollicitudin lacus risus dictum orci. Press Ctrl + C to copy

Vivamus vel enim at lorem ultricies faucibus. Cras vitae ipsum ut quam varius dignissim a ac tellus. Aliquam maximus mauris eget tincidunt interdum. Fusce vitae massa non risus congue tincidunt. Pellentesque maximus elit quis eros lobortis dictum.


Fusce placerat ipsum vel sollicitudin imperdiet. Morbi vulputate non diam at consequat. Donec vitae sem eu arcu auctor scelerisque vel in turpis. Pellentesque dapibus justo dui, quis egestas sapien porttitor in.

设置

¥Setup

如果你还没有该代码片段,请运行以下命令添加 prose 代码片段。

¥If you don't already have the snippet, run the following command to add the prose snippet

npx @chakra-ui/cli snippet add prose

用法

¥Usage

import { Prose } from "@/components/ui/prose"
<Prose>
  <div dangerouslySetInnerHTML={{ __html: "..." }} />
</Prose>

示例

¥Examples

尺寸

¥Sizes

使用 size 属性更改 Prose 组件的大小

¥Use the size prop to change the size of the Prose component

size: md

Title Heading 1

Title Heading 2

Title Heading 3

Title Heading 4

Title Heading 4 testing

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi at dolor nec ex rutrum semper. Praesent ultricies purus eget lectus tristique egestas ac in lacus. Nulla eleifend lorem risus, sit amet dictum nisi gravida eget. Suspendisse odio sem, scelerisque congue luctus nec, scelerisque ultrices orci. Praesent tincidunt, risus ut commodo cursus, ligula orci tristique justo, vitae sollicitudin lacus risus dictum orci. Press Ctrl +C to copy

size: lg

Title Heading 1

Title Heading 2

Title Heading 3

Title Heading 4

Title Heading 4 testing

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi at dolor nec ex rutrum semper. Praesent ultricies purus eget lectus tristique egestas ac in lacus. Nulla eleifend lorem risus, sit amet dictum nisi gravida eget. Suspendisse odio sem, scelerisque congue luctus nec, scelerisque ultrices orci. Praesent tincidunt, risus ut commodo cursus, ligula orci tristique justo, vitae sollicitudin lacus risus dictum orci. Press Ctrl +C to copy

块引用

¥Blockquote

Blockquote 元素的样式与 Blockquote 组件的设计语言相匹配。

¥Blockquote elements are styled to match the design language of the Blockquote component.

Blockquotes

This is a good looking blockquote!

And it can span into multiple lines:

Fusce placerat ipsum vel sollicitudin imperdiet. Morbi vulputate non diam at consequat. Donec vitae sem eu arcu auctor scelerisque vel in turpis. Pellentesque dapibus justo dui, quis egestas sapien porttitor in.

There's also strong, b, em support as well! But, let's display some code!

列表

¥List

列表元素的样式与 List 组件的设计语言相匹配。

¥List elements are styled to match the design language of the List component.

Lists

Let's look at some unordered lists. Things to buy:

  • Milk
  • Eggs
  • Bread
  • Chakra UI Pro license

And some ordered lists. Things to do:

  1. Pay the bills
  2. Walk the dog
  3. Take out trash

React Markdown

以下是使用 react-markdown 库渲染 Markdown 内容的示例。

¥Here's an example of using the react-markdown library to render markdown content.

Heading

Based on your Chakra package. So click here to confirm your plan.

  • first item
  • second item
  • second item
  • second item

title

表格

¥Table

表格元素的样式与 Table 组件的设计语言相匹配。

¥The table elements are styled to match the design language of the Table component.

Tables

Name Role GitHub Profile
Segun Creator segunadebayo
Chris Ark Wizard grizzlycodes
Abraham Trouble maker anubra266
Esther Developer Advocate estheragbaje

Previous

标记

Next

文本