Some checks failed
App Prod-Parity E2E Dispatch / dispatch (push) Failing after 10s
CD Storybook UI / build (push) Failing after 3m25s
CD Storybook UI / dispatch (push) Has been skipped
CD deploy main / website-changed-files (push) Successful in 18m8s
CI Agent Skills / changed-files-check (push) Successful in 18m9s
CI Create App E2E minimal / changed-files-check (push) Successful in 24s
CI Create App / changed-files-check (push) Successful in 26s
CI Docs / changed-files-check (push) Successful in 26s
CI Emails / changed-files-check (push) Successful in 28s
CI Example App Hello World / changed-files-check (push) Successful in 23s
CI Front / changed-files-check (push) Has been skipped
CI Example App Postcard / changed-files-check (push) Successful in 27s
CI UI / changed-files-check (push) Has been skipped
CI Utils Test / changed-files-check (push) Successful in 45s
CI Twenty Apps / discover (push) Successful in 1m3s
CD deploy main / deploy-main (push) Failing after 3s
CI Agent Skills / agent-skills-validate (push) Has been skipped
CI Create App / create-app-test (lint) (push) Has been skipped
CI Emails / emails-test (push) Has been skipped
CI Front / front-task (lingui:compile) (push) Has been skipped
CI Front / front-task (lint) (push) Has been skipped
CI Example App Postcard / example-app-postcard (push) Has been skipped
CI UI / ui-task (lint) (push) Has been skipped
CI UI / ui-task (pack-size) (push) Has been skipped
CI UI / ui-task (size) (push) Has been skipped
CI UI / ui-task (test) (push) Has been skipped
CI UI / ui-task (typecheck) (push) Has been skipped
CI Utils Test / utils-test (push) Has been skipped
CI Twenty Apps / ${{ matrix.app.name }} (push) Has been skipped
CI Emails / ci-emails-status-check (push) Successful in 2s
CI Example App Hello World / ci-example-app-hello-world-status-check (push) Successful in 2s
CI Example App Postcard / ci-example-app-postcard-status-check (push) Successful in 3s
CI UI / ui-sb-test (push) Has been skipped
CI Utils Test / ci-utils-test-status-check (push) Successful in 2s
CI Twenty Apps / ci-twenty-apps-status-check (push) Successful in 2s
CI UI / ci-ui-status-check (push) Successful in 2s
CI Desktop / desktop (push) Failing after 1m8s
Push docs to Crowdin / Push documentation to Crowdin (push) Failing after 55s
Push translations to Crowdin / Extract and upload translations (push) Failing after 5s
Push website translations to Crowdin / Extract and upload website translations (push) Failing after 5s
CI Create App / create-app-test (test) (push) Has been skipped
CI Create App / create-app-test (typecheck) (push) Has been skipped
CI Docs / docs-lint (push) Has been skipped
CI Example App Hello World / example-app-hello-world (push) Has been skipped
CI Front / front-task (lingui:extract) (push) Has been skipped
CI Front / front-task (test) (push) Has been skipped
CI Front / front-task (typecheck) (push) Has been skipped
CI UI / ui-sb-build (push) Failing after 1m32s
CI Twenty Apps / ${{ matrix.app.name }} (${{ matrix.server-source }}) (push) Has been skipped
CI Agent Skills / agent-skills-publish (push) Has been skipped
CI Create App / ci-create-app-status-check (push) Successful in 2s
CI Agent Skills / agent-skills-remote-source (push) Has been skipped
CI Create App E2E minimal / create-app-e2e-minimal (push) Has been cancelled
CI E2E Main / e2e-test (push) Has been cancelled
CI Front / front-sb-build (push) Has been cancelled
CI Front / front-build (push) Has been cancelled
CI Create App E2E minimal / ci-create-app-e2e-minimal-status-check (push) Has been cancelled
CI E2E Main / ci-e2e-main-status-check (push) Has been cancelled
CI E2E Main / notify-main-ci-failure (push) Has been cancelled
CI E2E Main / qa-scout-comment (push) Has been cancelled
CI Front / front-sb-test (push) Has been cancelled
CI Front / front-sb-screenshots (push) Has been cancelled
CI Front / ci-front-status-check (push) Has been cancelled
DPA Sub-Processor Sync / sync-subprocessors (push) Failing after 3s
AI Catalog Sync / sync-catalog (push) Failing after 2s
300 lines
13 KiB
Plaintext
300 lines
13 KiB
Plaintext
{/*
|
|
* _____ _
|
|
*|_ _|_ _____ _ __ | |_ _ _
|
|
* | | \ \ /\ / / _ \ '_ \| __| | | | 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
|
|
*/}
|
|
|
|
### Slider.Root
|
|
|
|
<ParamField body="Root.className" type="string | ((state: SliderRootState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.color" type=""accent" | "success"" default="accent">
|
|
Color of the indicator and thumbs.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.defaultValue" type="number | readonly number[]">
|
|
The uncontrolled value of the slider when it's initially rendered.
|
|
|
|
To render a controlled slider, use the `value` prop instead.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.disabled" type="boolean" default="false">
|
|
Whether the slider should ignore user interaction.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.form" type="string">
|
|
Identifies the form that owns the slider inputs.
|
|
Useful when the slider is rendered outside the form.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.format" type="NumberFormatOptions">
|
|
Options to format the value.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.largeStep" type="number" default="10">
|
|
The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.locale" type="LocalesArgument">
|
|
The locale used by `Intl.NumberFormat` when formatting the value.
|
|
Defaults to the user's runtime locale.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.max" type="number" default="100">
|
|
The maximum allowed value of the slider.
|
|
Should not be equal to min.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.min" type="number" default="0">
|
|
The minimum allowed value of the slider.
|
|
Should not be equal to max.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.minStepsBetweenValues" type="number" default="0">
|
|
The minimum steps between values in a range slider.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.name" type="string">
|
|
Identifies the field when a form is submitted.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.onValueChange" type="((value: TValue extends number ? number : TValue, eventDetails: SliderRootChangeEventDetails) => void)">
|
|
Callback function that is fired when the slider's value changed.
|
|
Receives the new value as the first argument; the originating event is
|
|
available as `eventDetails.event`. The value is also reflected on
|
|
`eventDetails.event.target.value` for form integration.
|
|
|
|
The `eventDetails.reason` indicates what triggered the change:
|
|
|
|
- `'input-change'` when the hidden range input emits a change event (for example, via form integration)
|
|
- `'track-press'` when the control track is pressed
|
|
- `'drag'` while dragging a thumb
|
|
- `'keyboard'` for keyboard input
|
|
- `'none'` when the change is triggered without a specific interaction
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.onValueCommitted" type="((value: TValue extends number ? number : TValue, eventDetails: SliderRootCommitEventDetails) => void)">
|
|
Callback function that is fired when a value change is committed.
|
|
Does not fire if the value did not change, or if the change was canceled.
|
|
**Warning**: This is a generic event, not a change event.
|
|
|
|
The `eventDetails.reason` indicates what triggered the commit:
|
|
|
|
- `'drag'` while dragging a thumb
|
|
- `'track-press'` when the control track is pressed
|
|
- `'keyboard'` for keyboard input
|
|
- `'input-change'` when the hidden range input emits a change event (for example, via form integration)
|
|
- `'none'` when the commit occurs without a specific interaction
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.orientation" type=""horizontal" | "vertical"" default="horizontal">
|
|
The component orientation.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SliderRootState>">
|
|
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="Root.step" type="number" default="1">
|
|
The granularity with which the slider can step through values. (A "discrete" slider.)
|
|
The `min` prop serves as the origin for the valid values.
|
|
We recommend (max - min) to be evenly divisible by the step.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.style" type="CSSProperties | ((state: SliderRootState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.thumbAlignment" type=""center" | "edge" | "edge-client-only"" default="edge">
|
|
How the thumb(s) are aligned relative to `Slider.Control` when the value is at `min` or `max`:
|
|
- `center`: The center of the thumb is aligned with the control edge
|
|
- `edge`: The thumb is inset within the control such that its edge is aligned with the control edge
|
|
- `edge-client-only`: Same as `edge` but renders after React hydration on the client, reducing bundle size in return
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.thumbCollisionBehavior" type=""none" | "push" | "swap"" default="push">
|
|
Controls how thumbs behave when they collide during pointer interactions.
|
|
|
|
- `'push'` (default): Thumbs push each other without restoring their previous positions when dragged back.
|
|
- `'swap'`: Thumbs swap places when dragged past each other.
|
|
- `'none'`: Thumbs cannot move past each other; excess movement is ignored.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.value" type="number | readonly number[]">
|
|
The value of the slider.
|
|
For range sliders, provide an array with one value per thumb.
|
|
</ParamField>
|
|
|
|
### Slider.Control
|
|
|
|
<ParamField body="Control.className" type="string | ((state: SliderControlState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Control.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SliderControlState>">
|
|
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="Control.style" type="CSSProperties | ((state: SliderControlState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Slider.Track
|
|
|
|
<ParamField body="Track.className" type="string | ((state: SliderTrackState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Track.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SliderTrackState>">
|
|
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="Track.style" type="CSSProperties | ((state: SliderTrackState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Slider.Indicator
|
|
|
|
<ParamField body="Indicator.className" type="string | ((state: SliderIndicatorState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Indicator.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SliderIndicatorState>">
|
|
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="Indicator.style" type="CSSProperties | ((state: SliderIndicatorState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Slider.Thumb
|
|
|
|
<ParamField body="Thumb.aria-valuetext" type="string">
|
|
A string value forwarded to the [`aria-valuetext`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuetext) attribute of the `input`.
|
|
Ignored when `getAriaValueText` is provided.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.className" type="string | ((state: SliderThumbState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.disabled" type="boolean" default="false">
|
|
Whether the thumb should ignore user interaction.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.getAriaLabel" type="((index: number) => string) | null">
|
|
A function which returns a string value for the [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label) attribute of the `input`.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.getAriaValueText" type="((formattedValue: string, value: number, index: number) => string) | null">
|
|
A function which returns a string value for the [`aria-valuetext`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuetext) attribute of the `input`.
|
|
This is important for screen reader users.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.index" type="number">
|
|
The index of the thumb which corresponds to the index of its value in the
|
|
`value` or `defaultValue` array.
|
|
This prop is required to support server-side rendering for range sliders
|
|
with multiple thumbs.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.inputRef" type="Ref<HTMLInputElement>">
|
|
A ref to access the nested input element.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.onBlur" type="FocusEventHandler<HTMLInputElement>">
|
|
A blur handler forwarded to the `input`.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.onFocus" type="FocusEventHandler<HTMLInputElement>">
|
|
A focus handler forwarded to the `input`.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.onKeyDown" type="KeyboardEventHandler<HTMLInputElement>">
|
|
A keydown handler forwarded to the `input`.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SliderThumbState>">
|
|
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="Thumb.style" type="CSSProperties | ((state: SliderThumbState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Thumb.tabIndex" type="number">
|
|
Optional tab index attribute forwarded to the `input`.
|
|
</ParamField>
|
|
|
|
### Slider.Label
|
|
|
|
<ParamField body="Label.className" type="string | ((state: SliderRootState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Label.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SliderRootState>">
|
|
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="Label.style" type="CSSProperties | ((state: SliderRootState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Slider.Value
|
|
|
|
<ParamField body="Value.className" type="string | ((state: SliderValueState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Value.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SliderValueState>">
|
|
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="Value.style" type="CSSProperties | ((state: SliderValueState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|