Skip to content

The open alternative to Salesforce, designed for AI.

4.0 KB
Raw Blame
{/*
 * _____                    _
 *|_   _|_      _____ _ __ | |_ _   _
 *  | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file
 *  | |  \ V  V /  __/ | | | |_| |_| | DO NOT EDIT - changes will be overwritten
 *  |_|   \_/\_/ \___|_| |_|\__|\__, | Generated by: npx nx generate:ui twenty-docs
 *                              |___/
 *
 * This file is generated from the documentation data in packages/twenty-ui/generated.
 * To update it, edit the component prop types or design tokens in twenty-ui and run:
 *   npx nx generate:ui twenty-docs
 */}

<ParamField body="aria-label" type="string" required>
  Accessible group name. Supply this or `aria-labelledby`.
</ParamField>

<ParamField body="aria-labelledby" type="string" required>
  ID of an element that labels the group. Supply this or `aria-label`.
</ParamField>

<ParamField body="className" type="string | ((state: RadioGroupState) =&gt; string | undefined)">
  CSS class applied to the element, or a function that
  returns a class based on the component's state.
</ParamField>

<ParamField body="defaultValue" type="string">
  The uncontrolled value of the radio button that should be initially selected.

  To render a controlled radio group, use the `value` prop instead.
</ParamField>

<ParamField body="disabled" type="boolean" default="false">
  Whether the component should ignore user interaction.
</ParamField>

<ParamField body="form" type="string">
  Identifies the form that owns the radio inputs.
  Useful when the radio group is rendered outside the form.
</ParamField>

<ParamField body="fullWidth" type="boolean" default="false">
  Stretch the control to the width of its container.
</ParamField>

<ParamField body="inputRef" type="Ref&lt;HTMLInputElement&gt;">
  A ref to access the hidden input element.
</ParamField>

<ParamField body="itemWidth" type="&quot;content&quot; | &quot;equal&quot;" default="equal">
  Use equal-width options or size each option to its content.
</ParamField>

<ParamField body="name" type="string">
  Identifies the field when a form is submitted.
</ParamField>

<ParamField body="onValueChange" type="((value: TValue, eventDetails: { reason: &quot;none&quot;; event: Event; cancel: () =&gt; void; allowPropagation: () =&gt; void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element | undefined; }) =&gt; void)">
  Callback fired when the value changes.
</ParamField>

<ParamField body="options" type="readonly SegmentedControlOption&lt;TValue&gt;[]" required>
  Options with a unique string `value`, a `label` or `startIcon`, and optional `disabled`. Icon-only options require an `aria-label`.
</ParamField>

<ParamField body="readOnly" type="boolean" default="false">
  Whether the user should be unable to select a different radio button in the group.
</ParamField>

<ParamField body="render" type="ReactElement&lt;unknown, string | JSXElementConstructor&lt;any&gt;&gt; | ComponentRenderFn&lt;HTMLProps, RadioGroupState&gt;">
  Allows you to replace the component's HTML element
  with a different tag, or compose it with another component.

  Accepts a `ReactElement` or a function that returns the element to render.
</ParamField>

<ParamField body="required" type="boolean" default="false">
  Whether the user must choose a value before submitting a form.
</ParamField>

<ParamField body="size" type="&quot;md&quot; | &quot;sm&quot;" default="md">
  Control height: `sm` (24px) or `md` (32px).
</ParamField>

<ParamField body="style" type="CSSProperties | ((state: RadioGroupState) =&gt; CSSProperties | undefined)">
  Style applied to the element, or a function that
  returns a style object based on the component's state.
</ParamField>

<ParamField body="value" type="string">
  The controlled value of the radio item that should be currently selected.

  To render an uncontrolled radio group, use the `defaultValue` prop instead.
</ParamField>

<ParamField body="variant" type="&quot;rectangle&quot; | &quot;round&quot;" default="round">
  Shape: `round` is a pill, `rectangle` fills its container with form-field corners.
</ParamField>