Blocks
A block is a single unit of content in Notion. It can be a paragraph, a heading, a callout, a code block, an image, a video, a file, a to-do, a toggle, a table, or a divider.
Supported Blocks
- Paragraph
- Callout
- Headings
- Code
- Image
- Video
- File
- To-do
- Toggle
- Table
- Divider
Paragraph
Components.Paragraph(text=["Hello, world!"])
Heading
Components.Heading(text=["Hello, world!"], level=1)
Callout
Components.Callout(text=["Hello, world!"], icon="👋", color="default")
Code
code = """
print("Hello, world!")
"""
Components.Code(text=code, language="python", caption="Hello, world!")