Skip to content

feat(Tabs): add badge on items#4553

Merged
benjamincanac merged 3 commits intonuxt:v3from
J-Michalek:feat/tabs-badge
Jul 21, 2025
Merged

feat(Tabs): add badge on items#4553
benjamincanac merged 3 commits intonuxt:v3from
J-Michalek:feat/tabs-badge

Conversation

@J-Michalek
Copy link
Contributor

🔗 Linked issue

Resolves: #4548

❓ 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

I've added the item.badge field allowing users to add badges at the end of the tab item.

📝 Checklist

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 20, 2025

npm i https://pkg.pr.new/@nuxt/ui@4553

commit: 56d0678

@benjamincanac benjamincanac merged commit 62ab016 into nuxt:v3 Jul 21, 2025
6 checks passed
<slot name="trailing" :item="item" :index="index" />
<slot name="trailing" :item="item" :index="index">
<UBadge
v-if="item.badge"
Copy link
Contributor

@MickL MickL Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe v-if="item.badge !== undefined" ? Because if badge is 0 it doesnt get displayed even tho it may be intended to display a zero.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MickL Indeed! Fixed in: b22891a

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

Labels

v3 #1289

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add badge option to UTabs

3 participants