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`. | Poll | optional | |||||||||
| 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 | ||||||||||
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
app-block: adds the poll to the core blocks.
Block base: the fields every block shares.
Blocks: the block model.
Examples: every example, grouped by feature.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime
Powered by Seed HypermediaOpen App