ToggleBlock

interface ToggleBlock : Block

Represents a toggle block in a Notion page. Toggle blocks are collapsible sections that can contain other blocks as children. They are useful for organizing content that can be expanded or collapsed by users.

When collapsed, only the toggle's text is visible. When expanded, all child blocks are displayed below the toggle text.

See also

Properties

Link copied to clipboard
abstract val children: List<Block>?
Link copied to clipboard
abstract val created: Timestamp
Link copied to clipboard
abstract val id: UuidString
Link copied to clipboard
abstract val lastEdited: Timestamp
Link copied to clipboard
abstract val text: RichTextList?

The rich text content that serves as the toggle's header. This text is always visible and acts as the clickable area to expand/collapse the block. If null, the toggle has no visible header text.