Lynx

Slider

A slider component that selects one or two values from a specified range.

Engine ≥ 3.6
Available since@seed-design/lynx-react@0.8.0, @seed-design/lynx-css@0.12.0
Loading Lynx example…

Installation

npx @seed-design/cli@latest add ui:slider --framework lynx

Props

Slider

The Slider in Registry is a convenience wrapper that combines the Slider primitive with Field guidance elements. When using one thumb, put one value in defaultValues or values, and when selecting a range, put two values.

Prop

Type

label?React.ReactNode
indicator?React.ReactNode
description?React.ReactNode
errorMessage?React.ReactNode
showRequiredIndicator?boolean | undefined
required?boolean | undefined
fieldRef?React.Ref<NodesRef> | undefined
className?string | undefined
style?CSSProperties | undefined
main-thread:bindbgload?EventHandler<BaseImageLoadEvent<Element>> | undefined
main-thread:catchbgload?EventHandler<BaseImageLoadEvent<Element>> | undefined
main-thread:capture-bindbgload?EventHandler<BaseImageLoadEvent<Element>> | undefined
main-thread:capture-catchbgload?EventHandler<BaseImageLoadEvent<Element>> | undefined
main-thread:global-bindbgload?EventHandler<BaseImageLoadEvent<Element>> | undefined
main-thread:bindbgerror?EventHandler<BaseImageErrorEvent<Element>> | undefined
main-thread:catchbgerror?EventHandler<BaseImageErrorEvent<Element>> | undefined
main-thread:capture-bindbgerror?EventHandler<BaseImageErrorEvent<Element>> | undefined
main-thread:capture-catchbgerror?EventHandler<BaseImageErrorEvent<Element>> | undefined
main-thread:global-bindbgerror?EventHandler<BaseImageErrorEvent<Element>> | undefined
main-thread:bindtouchstart?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:catchtouchstart?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-bindtouchstart?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-catchtouchstart?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:global-bindtouchstart?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:bindtouchmove?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:catchtouchmove?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-bindtouchmove?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-catchtouchmove?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:global-bindtouchmove?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:bindtouchcancel?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:catchtouchcancel?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-bindtouchcancel?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-catchtouchcancel?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:global-bindtouchcancel?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:bindtouchend?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:catchtouchend?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-bindtouchend?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-catchtouchend?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:global-bindtouchend?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:bindlongpress?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:catchlongpress?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-bindlongpress?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-catchlongpress?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:global-bindlongpress?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:bindtransitionstart?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:catchtransitionstart?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:capture-bindtransitionstart?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:capture-catchtransitionstart?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:global-bindtransitionstart?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:bindtransitioncancel?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:catchtransitioncancel?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:capture-bindtransitioncancel?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:capture-catchtransitioncancel?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:global-bindtransitioncancel?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:bindtransitionend?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:catchtransitionend?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:capture-bindtransitionend?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:capture-catchtransitionend?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:global-bindtransitionend?EventHandler<BaseTransitionEvent<Element>> | undefined
main-thread:bindanimationstart?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:catchanimationstart?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-bindanimationstart?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-catchanimationstart?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:global-bindanimationstart?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:bindanimationiteration?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:catchanimationiteration?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-bindanimationiteration?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-catchanimationiteration?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:global-bindanimationiteration?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:bindanimationcancel?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:catchanimationcancel?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-bindanimationcancel?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-catchanimationcancel?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:global-bindanimationcancel?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:bindanimationend?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:catchanimationend?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-bindanimationend?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:capture-catchanimationend?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:global-bindanimationend?EventHandler<BaseAnimationEvent<Element>> | undefined
main-thread:bindmousedown?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmousedown?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmousedown?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmousedown?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmousedown?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindmouseup?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmouseup?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmouseup?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmouseup?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmouseup?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindmousemove?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmousemove?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmousemove?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmousemove?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmousemove?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindmouseenter?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmouseenter?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmouseenter?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmouseenter?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmouseenter?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindmouseleave?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmouseleave?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmouseleave?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmouseleave?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmouseleave?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindmouseclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmouseclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmouseclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmouseclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmouseclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindmousedblclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmousedblclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmousedblclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmousedblclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmousedblclick?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindmouselongpress?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchmouselongpress?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindmouselongpress?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchmouselongpress?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindmouselongpress?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindwheel?EventHandler<BaseWheelEvent<Element>> | undefined
main-thread:catchwheel?EventHandler<BaseWheelEvent<Element>> | undefined
main-thread:capture-bindwheel?EventHandler<BaseWheelEvent<Element>> | undefined
main-thread:capture-catchwheel?EventHandler<BaseWheelEvent<Element>> | undefined
main-thread:global-bindwheel?EventHandler<BaseWheelEvent<Element>> | undefined
main-thread:bindzoom?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:catchzoom?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-bindzoom?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:capture-catchzoom?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:global-bindzoom?EventHandler<BaseMouseEvent<Element>> | undefined
main-thread:bindkeydown?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:catchkeydown?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:capture-bindkeydown?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:capture-catchkeydown?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:global-bindkeydown?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:bindkeyup?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:catchkeyup?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:capture-bindkeyup?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:capture-catchkeyup?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:global-bindkeyup?EventHandler<BaseKeyEvent<Element>> | undefined
main-thread:bindfocus?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:catchfocus?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:capture-bindfocus?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:capture-catchfocus?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:global-bindfocus?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:bindblur?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:catchblur?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:capture-bindblur?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:capture-catchblur?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:global-bindblur?EventHandler<BaseCommonEvent<Element>> | undefined
main-thread:bindlayoutchange?EventHandler<LayoutChangeDetailEvent<Element>> | undefined
main-thread:catchlayoutchange?EventHandler<LayoutChangeDetailEvent<Element>> | undefined
main-thread:capture-bindlayoutchange?EventHandler<LayoutChangeDetailEvent<Element>> | undefined
main-thread:capture-catchlayoutchange?EventHandler<LayoutChangeDetailEvent<Element>> | undefined
main-thread:global-bindlayoutchange?EventHandler<LayoutChangeDetailEvent<Element>> | undefined
main-thread:binduiappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:catchuiappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:capture-binduiappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:capture-catchuiappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:global-binduiappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:binduidisappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:catchuidisappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:capture-binduidisappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:capture-catchuidisappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:global-binduidisappear?EventHandler<UIAppearanceDetailEvent<Element>> | undefined
main-thread:bindaccessibilityaction?EventHandler<AccessibilityActionDetailEvent<Element>> | undefined
main-thread:catchaccessibilityaction?EventHandler<AccessibilityActionDetailEvent<Element>> | undefined
main-thread:capture-bindaccessibilityaction?EventHandler<AccessibilityActionDetailEvent<Element>> | undefined
main-thread:capture-catchaccessibilityaction?EventHandler<AccessibilityActionDetailEvent<Element>> | undefined
main-thread:global-bindaccessibilityaction?EventHandler<AccessibilityActionDetailEvent<Element>> | undefined
main-thread:bindtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:catchtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-bindtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-catchtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:global-bindtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:bindlongtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:catchlongtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-bindlongtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:capture-catchlongtap?EventHandler<BaseTouchEvent<Element>> | undefined
main-thread:global-bindlongtap?EventHandler<BaseTouchEvent<Element>> | undefined
values?number[] | undefined
defaultValues?number[] | undefined
min?number | undefined
max?number | undefined
step?number | undefined
allowedValues?number[] | undefined
minStepsBetweenThumbs?number | undefined
dir?"ltr" | "rtl" | undefined
disabled?boolean | undefined
readOnly?boolean | undefined
invalid?boolean | undefined
onValuesChange?((values: number[]) => void) | undefined
onValuesCommit?((values: number[]) => void) | undefined
getAccessibilityLabel?((thumbIndex: number) => string) | undefined
getAccessibilityValueText?((value: number, thumbIndex: number) => string) | undefined
getValueIndicatorLabel?((params: { value: number; thumbIndex: number; }) => React.ReactNode) | undefined
valueIndicatorTrigger?"auto" | "active" | undefined

The Registry wrapper provides two types of props:

  • Slider state and behavior: Directly passes values, defaultValues, min, max, step, allowedValues, minStepsBetweenThumbs, dir, disabled, readOnly, invalid, onValuesChange, onValuesCommit, getAccessibilityLabel, getAccessibilityValueText, getValueIndicatorLabel, and valueIndicatorTrigger from the low-level Root.
  • Display and Field guidance: Provides label, labelWeight, indicator, description, errorMessage, showRequiredIndicator, markers, ticks, tickWeight, hideRange, hideValueIndicator, and fieldRef. Each item in markers is a number or a { value, label?, align? } object.

When allowedValues is specified, only allowed values can be selected and it takes precedence over step and minStepsBetweenThumbs. When values and onValuesChange are used together, it becomes a controlled state, and onValuesCommit is called when the value is finalized.

Usage

Instead of using the Registry composition, you can directly use the @seed-design/lynx-react primitives. Combine SliderControl and SliderTrack inside SliderRoot, and place SliderRange and necessary SliderTick inside the track. Create each thumb with SliderThumb, and the Value Indicator is composed of SliderValueIndicatorRoot, SliderValueIndicatorArrow, and SliderValueIndicatorArrowTip and SliderValueIndicatorLabel within it. If you need markers, place SliderMarker inside SliderMarkers.

import { useState } from "@lynx-js/react";
import {
  ActionButton,
  SliderControl,
  SliderMarker,
  SliderMarkers,
  SliderRange,
  SliderRoot,
  SliderThumb,
  SliderTick,
  SliderTrack,
  SliderValueIndicatorArrow,
  SliderValueIndicatorArrowTip,
  SliderValueIndicatorLabel,
  SliderValueIndicatorRoot,
} from "@seed-design/lynx-react";

export function PriceSlider() {
  const [values, setValues] = useState([40]);

  const setPreset = () => {
    setValues([60]);
  };

  return (
    <view>
      <SliderRoot
        values={values}
        min={0}
        max={100}
        step={10}
        onValuesChange={setValues}
        getAccessibilityLabel={() => "Price"}
        getAccessibilityValueText={(value) => `${value} KRW`}
      >
        <SliderControl>
          <SliderTrack>
            <SliderRange />
            <SliderTick value={0} />
            <SliderTick value={50} />
            <SliderTick value={100} />
          </SliderTrack>
          <SliderValueIndicatorRoot index={0}>
            <SliderValueIndicatorArrow>
              <SliderValueIndicatorArrowTip />
            </SliderValueIndicatorArrow>
            <SliderValueIndicatorLabel index={0} />
          </SliderValueIndicatorRoot>
          <SliderThumb index={0} />
        </SliderControl>
        <SliderMarkers>
          <SliderMarker value={0}>0 KRW</SliderMarker>
          <SliderMarker value={100}>100 KRW</SliderMarker>
        </SliderMarkers>
      </SliderRoot>
      <ActionButton bindtap={setPreset}>Set to 60 KRW</ActionButton>
    </view>
  );
}

The index of SliderThumb indicates the position of the thumb in the values array. When directly combining package primitives, value changes and submission and validation are still handled in app state and request flow.

Examples

Basic

Set the selection range with min and max, and select a value with one thumb.

Loading Lynx example…

Steps

Set the selection interval with step to select only values in fixed increments.

Loading Lynx example…

Allowed Values

Specify selectable values with allowedValues. When this prop is set, allowedValues takes precedence over step and minStepsBetweenThumbs.

Loading Lynx example…

With Ticks

You can display ticks on the track that indicate the selection unit.

Thin

Use small intervals and display thin ticks to make it appear as continuous manipulation.

Loading Lynx example…

Thick

Display thick ticks when the value intervals are large or selection is only allowed at tick positions.

Loading Lynx example…

With Markers

Display markers below the slider that explain key values. Marker visual text is not automatically included in native accessibility values, so pass necessary meaning through getAccessibilityValueText.

You can pass a number or a { value, label?, align? } object to markers. If align is omitted in the object, the minimum value is placed at the start, the maximum value at the end, and others in the center.

Loading Lynx example…

Controlled

Control the slider value with app state using values and onValuesChange.

Loading Lynx example…

Listening to Value Changes

  • onValuesChange: Called whenever the value changes during dragging. Use this to display the current value on screen or update app state in real time.
  • onValuesCommit: Called when value changes are complete. In Lynx native, it is called once on touch release of a drag with value changes. You do not need to add debounce to this callback.
Loading Lynx example…

Disabled

Use disabled to prevent thumb manipulation and display disabled state styling.

Loading Lynx example…

Hide Range

Use hideRange to hide the active range color and display only the track.

Loading Lynx example…

Customizing Value Indicator

Value Indicator Label

Change the text of the Value Indicator displayed when manipulating the thumb with getValueIndicatorLabel.

The Value Indicator is supplementary UI displayed during native touch manipulation and is not the value read by accessibility navigation. If you need to provide meaningful units or descriptions, also use getAccessibilityValueText.

Loading Lynx example…

Value Indicator Trigger

Set the conditions for displaying the Value Indicator with valueIndicatorTrigger. In Lynx, you can use "auto" and "active".

  • "active": Display on the thumb being manipulated with the current touch.
  • "auto" (default): Behaves identically to "active" in native touch environments.

Web's hover-based display conditions or keyboard focus-based behavior are not supported in Lynx native.

Loading Lynx example…

Hide Value Indicator

Hide the Value Indicator above the thumb with hideValueIndicator.

Loading Lynx example…

Range Slider

Select a range between two thumbs by passing two values to defaultValues or values.

Loading Lynx example…

Minimum Steps Between Thumbs

Specify the minimum distance to maintain between two thumbs with minStepsBetweenThumbs.

Loading Lynx example…

Accessibility

getAccessibilityValueText

Native accessibility navigation provides each thumb with a value in the format minimum <min>, maximum <max>, current <value> by default. If the number alone is not meaningful, use getAccessibilityValueText to provide a description including units or meaning of the value.

Loading Lynx example…

getAccessibilityLabel

Describe the purpose of each thumb with getAccessibilityLabel. Particularly in range sliders, provide a label that distinguishes whether each thumb represents the minimum or maximum value.

Loading Lynx example…

Field Integration

Use label, labelWeight, indicator, description, errorMessage, and showRequiredIndicator to display Field guidance around the slider. When invalid is true and there is an errorMessage, error guidance is displayed.

Loading Lynx example…

RTL Support

Create a slider with values arranged from right to left with dir="rtl".

Loading Lynx example…

Differences from Web Version

Lynx Slider has the following differences from React Slider:

  • Rendering elements: Uses native <view> and <text> instead of HTML form input and DOM elements.
  • Input events: Uses native touch input instead of browser pointer/keyboard events, with value changes passed via onValuesChange and finalization via onValuesCommit.
  • Value Indicator: valueIndicatorTrigger="auto" is equivalent to touch-active in native and is not displayed on hover. It provides the same result as "active".
  • Accessibility: Provides native accessibility name and value through getAccessibilityLabel and getAccessibilityValueText instead of DOM ARIA.
  • Field guidance: Registry's label, description, and errorMessage are displayed with native layout. Label and description connection via DOM id is not used.
  • Range selection: Represents range with values array and two native thumbs.

Lynx Unsupported Features

Since Lynx does not have HTML form and browser keyboard models, the following React-only features are not provided as working examples:

FeatureReplacement or Limitation in Lynx
form submission, React Hook FormManage app state with values and onValuesChange, and handle submission in the app's request flow.
HiddenInputThere is no HTML hidden input. Construct the value to submit directly from app state.
nameThere is no native form field name. Use app state keys or request payload.
Browser validation and form field connectionDisplay screen errors with invalid and errorMessage, and perform validation in the app.
getAriaLabelledby and DOM ARIAThere is no DOM id connection. Provide native accessibility through getAccessibilityLabel and getAccessibilityValueText.
Keyboard, focus, focus-visibleThere is no keyboard thumb focus model. Use native touch and accessibility navigation.
HoverThere is no hover interaction in native. valueIndicatorTrigger="auto" behaves as touch-active like "active".

Therefore, Form (Uncontrolled) and React Hook Form are excluded from working examples in Lynx documentation. Even when submission and validation are needed, connect slider values to app state and use the app's submission and validation logic along with native accessibility guidance.

Table of contents