Styling individual chips #168
Replies: 3 comments 3 replies
-
Ok, after some more trying to make this work I found out that this case is not the best as it doesn't really work with |
Beta Was this translation helpful? Give feedback.
-
Hey @janpeterka thanks for the question. As you've noticed, rendering the chips in a separate container will likely cause issues downstream. I don't have plans to support that directly unfortunately. However, the good news is you can absolutely style chips yourself! It's a matter of implementing your own turbo stream templates for chips. Check out this example from the system tests:
You're right that this isn't documented yet. I'm waiting to see what kind of issues come up before settling on an API. Let me know if that doesn't work for you. Closing in the meantime. |
Beta Was this translation helpful? Give feedback.
-
Hi @josefarias, thank you for answering!
I was thinking about looking into that possibly (maybe using some separate controller with outlets or something), would you accept it then, or you don't want to complicate things?
Ok, it's lot simpler than I though, thanks!. But still, maybe default helper/template could support |
Beta Was this translation helpful? Give feedback.
-
I'm creating filter with multiple multiselect inputs (recipe category, dietary labels,...), and want to show all selected in one div - see image:

First part - showing them in same div - can be done setting
param[:for_id]
, no problem here (it's not documented, and it cannot be set inmultiselect_chip_src
, but other than that, it's ok).But I also want to separate them by color. And it seems (looking into code for
hw_combobox_selection_chips_for
) not possible to style chips.Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions