## Summary - **New Getting Started section** with quickstart guide and restructured navigation - **Halftone-style illustrations** for User Guide and Developer introduction cards using a Canvas 2D filter script - **Removed hero images** (`image:` frontmatter + `<Frame><img>` blocks) from all user-guide article pages - **Cleaned up translations** (13 languages): removed hero images and updated introduction cards to use halftone style - **Cleaned up twenty-ui pages**: removed outdated hero images from component docs - **Deleted orphaned images**: `table.png`, `kanban.png` - **Developer page**: fixed duplicate icon, switched to 3-column layout ## Test plan - [ ] Verify docs site builds without errors - [ ] Check User Guide introduction page renders halftone card images in both light and dark mode - [ ] Check Developer introduction page renders 3-column layout with distinct icons - [ ] Confirm article pages no longer show hero images at the top - [ ] Spot-check a few translated pages to ensure hero images are removed 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: github-actions <github-actions@twenty.com>
115 lines
2.7 KiB
Plaintext
115 lines
2.7 KiB
Plaintext
---
|
|
title: Radio
|
|
icon: "circle-dot"
|
|
---
|
|
<Frame>
|
|
<img src="/images/user-guide/create-workspace/workspace-cover.png" alt="Header" />
|
|
</Frame>
|
|
|
|
Used when users may only choose one option from a series of options.
|
|
|
|
<Tabs>
|
|
<Tab title="Usage">
|
|
|
|
```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="Props">
|
|
|
|
|
|
| Props | Type | Description |
|
|
|-------|------|-------------|
|
|
| style | `React.CSS` properties | Additional inline styles for the component |
|
|
| className | string | Optional CSS class for additional styling |
|
|
| checked | boolean | Indicates whether the radio button is checked |
|
|
| value | string | The label or text associated with the radio button |
|
|
| onChange | function | The function called when the selected radio button is changed |
|
|
| onCheckedChange | function | The function called when the `checked` state of the radio button changes |
|
|
| size | string | The size of the radio button. Options include: `large` and `small` |
|
|
| disabled | boolean | If `true`, the radio button is disabled and not clickable |
|
|
| labelPosition | string | The position of the label text relative to the radio button. Has two options: `left` and `right` |
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
|
|
## Radio Group
|
|
|
|
Groups together related radio buttons.
|
|
|
|
<Tabs>
|
|
<Tab title="Usage">
|
|
|
|
```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="Props">
|
|
|
|
|
|
| Props | Type | Description |
|
|
|-------|------|-------------|
|
|
| value | string | The value of the currently selected radio button |
|
|
| onChange | function | The callback function triggered when the radio button is changed |
|
|
| onValueChange | function | The callback function triggered when the selected value in the group changes. |
|
|
| children | `React.ReactNode` | Allows you to pass React components (such as Radio) as children to the Radio Group |
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|