Skip to content

Conversation

@JatinMehta007
Copy link

Closes #10514

Description

Added markerLabel to the sliderAnatomy and updated the Slider component to use <chakra.span> for the marker label. This allows the label to be styled via the theme system.

Current behavior (updates)

Currently, the slider marker label is a plain HTML <span> with a hardcoded class name (chakra-slider__marker-label). Because it is not part of the component anatomy or a chakra element, it ignores theme styles and cannot be customized via the theme config.

New behavior

  • Added markerLabel to the sliderAnatomy definition.
  • Updated the Slider component to render the label as a <chakra.span> instead of a plain <span>.
  • Connected the label to the theme system using __css={styles.markerLabel}.

This allows users to style the marker label (e.g., adding textOverflow, changing colors, or adjusting font size) directly through the theme.

Is this a breaking change (Yes/No):

No

Additional Information

Verified the changes in Storybook using the "With Marks" story. The existing class name chakra-slider__marker-label was preserved for backward compatibility.

@changeset-bot
Copy link

changeset-bot bot commented Dec 11, 2025

🦋 Changeset detected

Latest commit: fd0be2d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@chakra-ui/react Minor
@chakra-ui/charts Minor
@chakra-ui/cli Minor
@chakra-ui/panda-preset Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
chakra-ui-storybook Ready Ready Preview Dec 11, 2025 4:54am
chakra-v3-docs Error Error Dec 11, 2025 4:54am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slider marker label is not themeable

1 participant