ui icon indicating copy to clipboard operation
ui copied to clipboard

[UCommandPalette] Support for avatars with chips in `UCommandPalette` items (and `UButton`, …)

Open maximepvrt opened this issue 9 months ago • 2 comments

Description

I’ve been trying to display an avatar with a chip inside a UCommandPalette item (and UButton, …), but it looks like this use case isn't currently supported.

Additional context

No response

maximepvrt avatar Apr 08 '25 11:04 maximepvrt

@maximepvrt This doesn't suit you?

Image

Image

HugoRCD avatar Apr 09 '25 09:04 HugoRCD

@HugoRCD Thanks! That’s actually what I did. I redefined the slot to make it work.

That said, it would be great to support this natively, like in v2. There could be two possible approaches:

  • Either add a chip prop directly on the UAvatar component, which would automatically wrap the content in a UChip,
  • Or, for all components that use UAvatar, detect if the avatar prop includes a chip attribute, and if so, wrap the avatar in a chip accordingly.

maximepvrt avatar Apr 09 '25 10:04 maximepvrt