Example: Poll Block (Custom)
An example third-party block type: a poll with a question and options. It extends the shared block base, exactly like a core block.

Extends

id
The block's permanent identity inside its document.
inherited
revision
Output only: CID of the last Change that modified this block.
optional · inherited
type
Block type literal `Poll`.
Polloptional
question
The question the poll asks.
options
The answer choices, in display order.
of
attributes
Block attributes: layout keys plus poll settings such as `multiple`; other keys are allowed.
optional
childrenType
How the block's children are laid out, such as `Ordered` or `Grid`.
optional
columnCount
Number of columns when `childrenType` is `Grid`.
optional
multiple
Whether a voter may choose more than one option.
optional

other fields:

An example third-party block type: a poll with a required question, a required list of options, and attributes such as multiple. It extends block/base with the type literal Poll, like a core block does.

This page describes the example/poll-block type, one of the example schemas. The formal schema is attached as the schemaDefinition in this page's metadata, so the app can show it and create values of this type.

See also

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime