---
title: "radio buttons · RUAL Documentation"
description: "Generates buttons based on the objects in a given array. Will set a field to a given value on click."
canonical: https://docs.rual.nl/block-types/Component%20UI/component_radio_buttons
language: en
---

[Cluster](https://docs.rual.nl/cluster)

[Blocks](https://docs.rual.nl/block-types)

[Interfaces](https://docs.rual.nl/interfaces)

[Blueprints](https://docs.rual.nl/blueprints)

[Tutorials](https://docs.rual.nl/tutorials)

[Home automation](https://docs.rual.nl/home-automation)

[Examples](https://docs.rual.nl/examples)

[Reference](https://docs.rual.nl/reference)

[Architecture](https://docs.rual.nl/architecture)

[Troubleshooting](https://docs.rual.nl/troubleshooting)

Other

# radio buttons

This block is part of the [`Component UI`](https://docs.rual.nl/block-types/Component%20UI) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

Generates buttons based on the objects in a given array. Will set a field to a given value on click.

- buttons required `array` Buttons to be created. Should be the following format: [{ value, icon, text, style (optional), class (optional) }]

Default `[]`

- default value `value` The default value to be used if the value in the array is not set.

Default `None`

- default class `uiclass` The default class to be used if the class in the array is not set.

Default `btn btn-outline-primary`

- default style `uistyle` The default style to be used if the style in the array is not set.

Default `None`

- active class `uiclass` The class to be set when the button is set to active.

Default `active`

- field required `fielddefinitions` Field to save the value in

Default `None`

- validate `fieldvalidation` Applies the given validation to the element, overwrites attributes given in the attributes popup

Default `None`

- event `clickevent` Default `None`

- uicomponent `uicomponent`

A typical wiring for [radio buttons](https://docs.rual.nl/block-types/Component%2520UI/component_radio_buttons): [with values](https://docs.rual.nl/block-types/array/array_of_values) feeds the `array` pin; [combine](https://docs.rual.nl/block-types/fields/fielddefinitions_multiple) feeds the `fielddefinitions` pin; the `uicomponent` out pin feeds [build PDF](https://docs.rual.nl/block-types/files/file_generate_pdf).

[![Studio canvas example for the radio buttons block: typical wiring for radio buttons.](https://docs.rual.nl/canvas-examples/component_radio_buttons.png)](https://docs.rual.nl/canvas-examples/component_radio_buttons.png?v=3)

## Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

- [Back to `Component UI`](https://docs.rual.nl/block-types/Component%20UI): Return to the main group to view all sub-groups

- [Back to `form`](https://docs.rual.nl/block-types/Component%20UI?group=form): Return to the group to view all blocks within this group

Was this page helpful? [Tell us what to improve](https://docs.rual.nl/support) · RUAL Docs is an integral component of the [RUAL ecosystem](https://rual.nl)
