Skip to content

feat(Modal/Slideover): add actions slot #4358

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

Merged

Conversation

Barbapapazes
Copy link
Contributor

🔗 Linked issue

❓ 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

Hello 👋,

This PR introduces a new slot named header-actions to the Slideover component. This slot allows users to add custom actions, mainly near the close button, without having to completely override the header slot. This is particularly useful for adding additional buttons like "Expand" or "Collapse" to allow the user to control the slideover's size dynamically.

📝 Checklist

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

Siteproxy

搜索引擎


常用网站


新闻网站


海外论坛


Verified

This commit was signed with the committer’s verified signature.
Barbapapazes Estéban

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

pkg-pr-new bot commented Jun 16, 2025

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

commit: 5c801fa

Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

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

I believe we can just call this actions and maybe do the same in Modal as well? 🤔

This would match Alert and Toast components having an actions slot next to the close button.

@Barbapapazes
Copy link
Contributor Author

I believe we can just call this actions and maybe do the same in Modal as well? 🤔

This would match Alert and Toast components having an actions slot next to the close button.

Oh I never notice that Alert and Toast already have these slots. Will have a look and align this PR to the current implementation.

Copy link
Member

I think you can simply add an actions slot without implementing the loop on UButton for those, this is specific to Alert and Toast I would say.

Verified

This commit was signed with the committer’s verified signature.
Barbapapazes Estéban

Verified

This commit was signed with the committer’s verified signature.
Barbapapazes Estéban
@Barbapapazes Barbapapazes changed the title feat(Slideover): add a header-actions slot feat(Modal,Slideover): add slot actions Jun 17, 2025
@Barbapapazes
Copy link
Contributor Author

I think you can simply add an actions slot without implementing the loop on UButton for those, this is specific to Alert and Toast I would say.

Yes, it makes sense. I rename it to just actions and added it to the Modal component.

@benjamincanac benjamincanac changed the title feat(Modal,Slideover): add slot actions feat(Modal/Slideover): add actions slot Jun 24, 2025
up
up
up
up
@benjamincanac benjamincanac merged commit 8156971 into nuxt:v3 Jun 24, 2025
6 checks passed
@benjamincanac
Copy link
Member

Thanks @Barbapapazes! 😊

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.

None yet

2 participants