CycleButton =========== .. granite:servercomponent:: /libs/granite/ui/components/coral/foundation/cyclebutton A component that show the current active item. Only one item can be active at the same time. When clicked, the next item of the active is activated. If the last item is clicked, then the first item is activated. It has the following content structure: .. gnd:gnd:: [granite:CycleButton] > granite:commonAttrs, granite:renderCondition, granite:container /** * The display mode of the cycle button: * * icon * Icon display mode * * text * Text display mode * * icontext * Icon and text display mode */ - displayMode (String) = 'icon' < 'icon', 'text', 'icontext' /** * The variant of the cycle button. */ - variant (String) < 'actionBar' Each item has the following structure: .. gnd:gnd:: [granite:CycleButtonItem] > granite:commonAttrs, granite:renderCondition /** * ``true`` to pre-select this item, ``false`` otherwise. */ - selected (Boolean) /** * The text of the item. */ - text (String) i18n /** * I18n comment for the text of the item. */ - text_commentI18n (String) /** * The icon of the item. */ - icon (String) Example:: + mycyclebutton - sling:resourceType = "granite/ui/components/coral/foundation/cyclebutton" + items + button1 - text = "Button1" + button2 - text = "Button2" - text_commentI18n = "Button2 description" - selected = true + actions + action1 - text = "Action1" + action2 - text = "Action2"