Skip to main content
More in Learn

Choice component

The choice component allows you to semantically group multiple components, but only allowing one to be used at a time. This enables polymorphic components when editing the content, e.g. being able to choose if a hero component is image, video, or even a relation to a richer media item.

Polymorphic product properties with choice component screenshot

Semantic structure with flexible shapes

The concept behind the choice structural component is that you can define shapes that give choices to the editorial user to, for instance, manage different types of hero media like the image, video, or relation example below. This still keeps semantic integrity with all choices being grouped as hero, but the editorial user can only select one when creating the item.

Editorial UI showing polymorphic product properties with choice component

Editorial flexibility with choice component

When writing your product information, there will be different sets of properties that describe a TV vs. a fridge. When selected by the editorial user, you get the information about what type of product it is in addition to having specific properties describing the TV or fridge.

Flexibility while still retaining semantic structures for your product information and content.

Editorial UI showing polymorphic product properties with choice component
People showing thumbs up

Need further assistance?

Ask the Crystallize team or other enthusiasts in our slack community.

Join our slack community