BridgeBeta
  • Brand
  • Digital Assets
    Foundations
    Icons
    Components
    Templates
  • Resources
    Design Tokens
    How-tos
    Best Practices
    Libraries
    Accessibility
    Products List
  • Support
    • Overview
    • Actions
      • Overview
      • Button
      • ContextMenu
      • Link
    • Controls
      • Overview
      • Checkbox
      • Tag
      • Toggle
    • Forms
      • Overview
      • DatePicker
      • FileUploader
      • Input
      • NumberInput
      • RadioButton
      • Search
      • Select
      • Slider
      • TextArea
      • TextInput
    • Hooks
      • useIsomorphicLayoutEffect
      • useMediaQuery
      • useSettings
    • Navigation
      • Overview
      • AnchorNavigation
      • BannerNavigation
      • Breadcrumb
      • Footer
      • InfoBar
      • MainNavigation
      • SecondaryNavigation
      • StepNavigation
      • SubNavigation
    • Overlay
      • Overview
      • Credits
      • Modal
      • ModalWrapper
      • Notification
      • Tooltip
    • Structure
      • Overview
      • Accordion
      • AuthLayout
      • Avatar
      • Callout
      • Card
      • ContentSwitcher
      • Empty
      • Hero
      • InlineLoading
      • Item
      • List
      • Loading
      • mdxComponents
      • Module
      • Pagination
      • ReadMore
      • Story
      • Table
      • Tabs
      • Text
      • Unit
      • User
      • WFPCoreProvider
      • Wrapper
Components
Forms
Slider

Slider

  • Design
  • Code
  • Props

The slider in its basic form should be accompanied by a label and a number input that doubles as a display for the slider’s current value.

Import statement

import { Slider } from "@wfp/react"

Editable Example

<Slider
  min={0}
  max={100}
  step={1}
  value={50}
  onChange={(newValue) => console.log(newValue)}
/>;

Fullwidth Slider

Specify fullWidth property to be full to use the width of parent element

Editable Example

<Slider
  fullWidth
  helperText="Additional helper text"
  id="slider3"
  labelText="Slider Label"
  min={0}
  max={100}
  name="Form item name (name)"
  value={50}
/>;

Disabled and hide TextInput

Disable the slider using the diabled prop and also hide the textinput by using the hideTextInput prop. In these examples, the first slider is disabled, and the second one hides the text input. These options provide additional flexibility for different use cases.

Editable Example

<>
  <Slider min={0} max={100} value={30} disabled />
  <Slider min={0} max={100} value={70} hideTextInput />
</>;

Related

TextInput

On this page

  • Fullwidth Slider
  • Disabled and hide TextInput
  • Related

References

  • Storybook
Storybook
Figma library
Contact us
2025 © World Food Programme