The current version of the Þ spec is about to be deprecated. Learn more about v0.3, arriving February 2023.Learn more

Shuffle

Create a list and (re-)arrange it in a random order

By @hashβ€’V0.1.2
This block was written for an earlier version of the Block Protocol specification and cannot currently be displayed in the Hub.
{}

The Shuffle Block allows us to create a list of 'Things' and shuffle them into a random order.

Programmatic Usage

It accepts the following property (view the Shuffle Block entity type to see it in context)

Option one: a textual content item

{
  "https://blockprotocol.org/@hash/types/property-type/shuffle-block-item-id/": "1",
  "https://blockprotocol.org/@blockprotocol/types/property-type/textual-content/": "abc"
}

Option two: a representation of another entity

{
  "https://blockprotocol.org/@hash/types/property-type/shuffle-block-item-id/": "1",
  "https://blockprotocol.org/@hash/types/property-type/shuffle-block-item-associated-link-entity-id/": "abc"
}

When using the latter, there must be a link entity of entity type Has Representative Shuffle Block Item pointing to an entity to represent. The Graph module's parseLabelFromEntity will be used to render it.

Ready to build your own blocks?

Anyone can contribute

Anyone can create blocks and contribute to this growing, open-source registry of blocks. Read our quickstart guide to start building your own blocks.

Read the quickstart guide