Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zendeskgarden/container-slider

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zendeskgarden/container-slider

Containers relating to Slider in the Garden Design System

  • 0.1.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
95K
increased by6.79%
Maintainers
0
Weekly downloads
 
Created
Source

@zendeskgarden/container-slider npm version

This package includes containers relating to Slider in the Garden Design System.

Installation

npm install @zendeskgarden/container-slider

Usage

Check out storybook for live examples.

useSlider

import { useSlider } from '@zendeskgarden/container-slider';

const Slider = () => {
  const trackRef = createRef();
  const minThumbRef = createRef();
  const maxThumbRef = createRef();
  const { getTrackProps, getMinThumbProps, getMaxThumbProps, minValue, maxValue } = useSlider({
    trackRef,
    minThumbRef,
    maxThumbRef
  });

  return (
    <div {...getTrackProps()} ref={trackRef}>
      <div {...getMinThumbProps()} minThumbRef={minThumbRef}>
        {minValue}
      </div>
      <div {...getMaxThumbProps()} maxThumbRef={maxThumbRef}>
        {maxValue}
      </div>
    </div>
  );
};

SliderContainer

import { SliderContainer } from '@zendeskgarden/container-slider';

const trackRef = createRef();
const minThumbRef = createRef();
const maxThumbRef = createRef();

<SliderContainer trackRef={trackRef} minThumbRef={minThumbRef} maxThumbRef={maxThumbRef}>
  {({ getTrackProps, getMinThumbProps, getMaxThumbProps, minValue, maxValue }) => (
    <div {...getTrackProps()} trackRef={trackRef}>
      <div {...getMinThumbProps()} minThumbRef={minThumbRef}>
        {minValue}
      </div>
      <div {...getMaxThumbProps()} maxThumbRef={maxThumbRef}>
        {maxValue}
      </div>
    </div>
  )}
</SliderContainer>;

Keywords

FAQs

Package last updated on 25 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc