Skip to content

feat(Slider): Add slot to pass through tooltip content #4365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

dan-hale
Copy link
Contributor

@dan-hale dan-hale commented Jun 17, 2025

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Customize appearence of value in slider tooltip, such as with NumberFlow:

<USlider v-model="selected" tooltip v-slot="text">
  <NumberFlow :value="text" :format="{ style: 'decimal', trailingZeroDisplay: 'stripIfInteger' }" />
</USlider>

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Concerns

  1. I'm not sure what steps are necessary to properly add this to the documentation
  2. On lines 136-138, I place the slot in template with v-if. I'm unsure if this is the best way to do this. I'm trying ensure when no slot is passed, the default tooltip content is used.

@dan-hale dan-hale requested a review from benjamincanac as a code owner June 17, 2025 01:45
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.

1 participant