@100mslive/hms-ai-ui
Version:
100ms AI UI components
20 lines (19 loc) • 1.02 kB
TypeScript
import * as React from "react";
import * as SliderPrimitive from "@radix-ui/react-slider";
interface SingleThumbSliderProps extends Omit<React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>, "value" | "defaultValue" | "onValueChange"> {
/** If true, show a tooltip when hovering the thumb */
tooltip?: boolean;
/** Position of the tooltip relative to the thumb */
tooltip_direction?: "top" | "bottom";
/**
* Controlled value for the slider (single thumb).
* If this is set, the parent component is responsible for updating it in `onValueChange`.
*/
value?: number;
/** Uncontrolled default value for the slider (single thumb). Used if `value` is not provided. */
defaultValue?: number;
/** Handler called when the slider value changes. Receives the new numeric value. */
onValueChange?: (newValue: number) => void;
}
declare const Slider: React.ForwardRefExoticComponent<SingleThumbSliderProps & React.RefAttributes<HTMLSpanElement>>;
export { Slider };