Skip to content

SSR for Slider component does not work #1900

@outdoteth

Description

@outdoteth

On refreshing the page (using nextjs and react), the slider component is not selectable nor is it aligned correctly.

Screenshot 2023-01-21 at 13 11 31

After making some interactions and changing the state it then becomes selectable and aligns correctly:

Screenshot 2023-01-21 at 13 11 40

I'm assuming that this issue is to do with SSR.

here is my slider component:

<Slider.Root
  className={styles.root}
  defaultValue={[0]}
  value={[value]}
  onValueChange={([value]) => onChange(value)}
  max={max}
>
  <Slider.Track className={styles.track}>
    <Slider.Range className={styles.range} />
  </Slider.Track>
  <Slider.Thumb className={styles.thumb} />
</Slider.Root>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions