nuxt / nuxt/ui

SelectMenu/Select: FieldGroup orientation leaks into trigger slot content

Open
#6,945 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Environment
  • Operating System: macOS 26.6.2
  • Node Version: v24.14.1
  • Nuxt Version: 4.5.2
  • Vue Version: 3.5.42
  • Tailwind CSS: 4.3.3
  • Package Manager: pnpm
Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.11.1

Reproduction

https://play.ui.nuxt.com/#eNqtU0FL9DAQ/Svz9TtUwVgFESlVUUQRUQ+iF+sh286uwTQJSborlv53J1krXRYP4vbQNo+ZN2/ea7vkzJjdeYtJnhSussJ4cOhbA5Kr2XGZeFcmJ6USjdHWQwcWp9DD1OoGUmpLYbNXqSqtnAfhsXFwDM8dCZmgzCG95ULBHfqFtm/pDkx4PUOCn/b3UuhfhsY5ly1SI+nciiTPey/bpSqy5XK0Ch0IN5J7pBNAUYs5VJI7R+tOJb5DuLFKS5hxww7AsKPoQdBX/GMMzq1+Q5WDUE7UCI+XAmV9ZTW5xthQOEK/oAA+oMTK36JqYc4aXaOkoVFzmUAeBRMQnwQMqhbs8OBbQiQaNoD/NU55Kz1VdRAJn6ID/Up9GH0eDCN/rOAqlLt24mUY68QH0vk9JN2NSU53o8nQ90W2bF+ldIarb43etqoiReskMcBIEhrGW2QrQSyhkUUj366VaT1QbYWvWtZoaeIFLjMVWtEW2WB8tur8KLf7mxwcb5C+8DACFsK/aqL9IcCNZPXbpDae0x9TWstoPaEioz+I3kalSf8JymxaaQ==

Description

When a USelectMenu (same structure in USelect) is inside a UFieldGroup, components rendered in the trigger's #default slot inherit the field group context.

For example, a UBadge in the #default slot receives the fieldGroup: 'horizontal' variant classes:

not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none

Because the badge is the first child of the trigger button (followed by the label and trailing icon), not-only:first:rounded-e-none applies and the badge's right corners become square (computed radius: 4px 0 0 4px). The same select outside a UFieldGroup renders the badge correctly.

Created a PR

Image
Additional context

No response

Logs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction and compare USelectMenu and USelect inside and outside UFieldGroup. Trace how the trigger's #default slot receives field-group variant classes, then verify that a UBadge keeps its normal corner radius while the surrounding select still has the expected grouped styling.

Written by the indexing model from the issue text.

Assessment

Tech stack
tailwindcss, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.