GGamma

Design catalogue

Source atlas

Components37 results

ComponentsInputs

Elastic segment

A compact selector whose thumb stretches between choices.

What to study

  • Arrow keys, Home, and End move the selected radio and focus together.
  • The selected thumb and short trail settle in about 400 ms.
  • Use short, distinct labels; this control does not support dragging across slots.

Topics

References

Material

Status
New
Source File
src/components/ElasticSegment.tsx
Design System
gamma
Props
  • Name
    items
    Type
    string[]
    Default
    —
    Description
    Distinct choices in visual order.
  • Name
    value / defaultValue
    Type
    string
    Default
    First item
    Description
    Controlled or initial choice.
  • Name
    onChange
    Type
    (value, index) => void
    Default
    —
    Description
    Called when selection changes.
  • Name
    disabled
    Type
    boolean
    Default
    false
    Description
    Blocks selection and keyboard interaction.