/** * @dds-tokens * recipe: slider * variantProps: orientation, size, variant * figmaPropToRecipeProp: * Orientation: orientation * Size: size */ import figma from '@figma/code-connect'; import * as Slider from './Slider'; // Original designer-built component — Discourser AI Slider (38:7988) // This is the component used in production Discourser.AI page designs. // // Import as namespace: import * as Slider from '@discourser/design-system/Slider' // // Anatomy: // // Label text // // // // // ← convenience component, renders one Thumb per value // // ← optional, displays current value // // // Key props on Root: // defaultValue — uncontrolled initial value array, e.g. [50] // value — controlled value array, e.g. [50] // onValueChange — callback ({ value }: { value: number[] }) => void // min — number (default: 0) // max — number (default: 100) // step — number (default: 1) // orientation — 'horizontal' | 'vertical' (default: 'horizontal') // disabled — boolean // colorPalette — 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' // // Convenience components: // — renders one Thumb per value entry (use instead of // manually mapping Slider.Thumb with index props) // — renders a MarkerGroup figma.connect( Slider.Root, 'https://www.figma.com/design/GaHmFfmvO4loUzuZS4TgEz/Discourser.AI--V1?node-id=38-7988', { props: { orientation: figma.enum('Orientation', { Horizontal: 'horizontal', Vertical: 'vertical', }), }, example: ({ orientation }) => ( Volume ), }, );