Skip to content

feat(RadioGroup): add custom item slots#6744

Open
EvanSchleret wants to merge 2 commits into
nuxt:v4from
EvanSchleret:v4
Open

feat(RadioGroup): add custom item slots#6744
EvanSchleret wants to merge 2 commits into
nuxt:v4from
EvanSchleret:v4

Conversation

@EvanSchleret

Copy link
Copy Markdown
Contributor

❓ 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

This PR adds support for custom content slots in URadioGroup items.

Developers can now define a slot property on an item to replace its label and description with custom content. A generic content slot is also available for items without a custom slot.

The existing public slot types for legend, label, and description remain unchanged. Documentation, an example, and component tests have been added.

📝 Checklist

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

@github-actions github-actions Bot added the v4 #4488 label Jul 16, 2026
@EvanSchleret

Copy link
Copy Markdown
Contributor Author

Hey @benjamincanac, hope you're doing well!

I didn't add a version badge to the title of the example I added; is that something you handle when preparing your release? Or is it something I could add by myself to make your review easier to validate?

Let me know.

Thanks for your review :)

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 349c0969-7840-4cfe-b03c-faf2d8133b75

📥 Commits

Reviewing files that changed from the base of the PR and between 6352bfd and 12107aa.

📒 Files selected for processing (1)
  • docs/content/docs/2.components/radio-group.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/content/docs/2.components/radio-group.md

📝 Walkthrough

Walkthrough

Adds optional per-item and shared content slots to URadioGroup, including dynamic slot typing and fallback label/description rendering. New tests cover custom slots, shared content slots, and missing-slot fallback behavior. Documentation describes the slot property and slot props, and a new example demonstrates a custom slot for a radio item.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding custom item slots to RadioGroup.
Description check ✅ Passed The description is directly related and accurately summarizes the slot support, docs, example, and tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@6744

commit: 12107aa

Comment thread docs/content/docs/2.components/radio-group.md Outdated
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
@EvanSchleret

Copy link
Copy Markdown
Contributor Author

I added the soon badge you suggested. Let me know if I could do anything else. Thank you :)

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

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants