--- title: Rádio icon: kruh s tečkou --- Hlavička Používá se, když uživatelé mohou vybrat pouze jednu možnost ze série možností. ```jsx import { Radio } from "twenty-ui/display"; export const MyComponent = () => { const handleRadioChange = (event) => { console.log("Radio button changed:", event.target.checked); }; const handleCheckedChange = (checked) => { console.log("Checked state changed:", checked); }; return ( ); }; ``` | Vlastnosti | Typ | Popis | | --------------- | ---------------------- | ---------------------------------------------------------------------------------- | | styl | Vlastnosti `React.CSS` | Další inline styly pro komponentu | | className | řetězec | Volitelná CSS třída pro další stylování | | zaškrtnuté | booleovská hodnota | Indicates whether the radio button is checked | | hodnota | řetězec | Označení nebo text spojený s radiobuttonem | | onChange | funkce | The function called when the selected radio button is changed | | onCheckedChange | funkce | The function called when the `checked` state of the radio button changes | | velikost | řetězec | Velikost radiobuttonu. Možnosti zahrnují: `velký` a `malý` | | neaktivní | booleovská hodnota | If `true`, the radio button is disabled and not clickable | | labelPosition | řetězec | Pozice textu označení vzhledem k radiobuttonu. Má dvě možnosti: `vlevo` a `vpravo` | ## Radio Group Groups together related radio buttons. ```jsx import React, { useState } from "react"; import { Radio, RadioGroup } from "twenty-ui/display"; export const MyComponent = () => { const [selectedValue, setSelectedValue] = useState("Option 1"); const handleChange = (event) => { setSelectedValue(event.target.value); }; return ( ); }; ``` | Vlastnosti | Typ | Popis | | --------------- | ----------------- | ---------------------------------------------------------------------------------- | | hodnota | řetězec | Hodnota aktuálně vybraného radiobuttonu | | onChange | funkce | The callback function triggered when the radio button is changed | | přiZměněHodnoty | funkce | Funkce spouštěná při změně vybrané hodnoty ve skupině. | | děti | `React.ReactNode` | Allows you to pass React components (such as Radio) as children to the Radio Group |