Files
twenty/packages/twenty-docs/l/cs/twenty-ui/input/radio.mdx
T
Félix Malfait 3dd858c91e i18n - docs translations (#16774)
Created by Github action

Pulls the latest documentation translations from Crowdin for all
supported languages:
- French (fr)
- Arabic (ar)  
- Czech (cs)
- German (de)
- Spanish (es)
- Italian (it)
- Japanese (ja)
- Korean (ko)
- Portuguese (pt)
- Romanian (ro)
- Russian (ru)
- Turkish (tr)
- Chinese (zh-CN)

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-12-23 14:26:11 +01:00

98 lines
3.9 KiB
Plaintext

---
title: Rádio
image: /images/user-guide/create-workspace/workspace-cover.png
---
<Frame>
<img src="/images/user-guide/create-workspace/workspace-cover.png" alt="Hlavička" />
</Frame>
Používá se, když uživatelé mohou vybrat pouze jednu možnost ze série možností.
<Tabs>
<Tab title="Použití">
```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 (
<Radio
checked={true}
value="Option 1"
onChange={handleRadioChange}
onCheckedChange={handleCheckedChange}
size="large"
disabled={false}
labelPosition="right"
/>
);
};
```
</Tab>
<Tab title="Vlastnosti">
| 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` |
</Tab>
</Tabs>
## Radio Group
Groups together related radio buttons.
<Tabs>
<Tab title="Použití">
```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 (
<RadioGroup value={selectedValue} onChange={handleChange}>
<Radio value="Option 1" />
<Radio value="Option 2" />
<Radio value="Option 3" />
</RadioGroup>
);
};
```
</Tab>
<Tab title="Vlastnosti">
| 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 |
</Tab>
</Tabs>