diff --git a/common/components/primitives.py b/common/components/primitives.py index 0625f74..6c76929 100644 --- a/common/components/primitives.py +++ b/common/components/primitives.py @@ -386,6 +386,7 @@ def Pill( value: str = "", removable: bool = False, extra_class: str = "", + label_slot: bool = False, attributes: list[HTMLAttribute] | None = None, ) -> SafeText: """A small label pill, optionally removable (× button). @@ -393,6 +394,10 @@ def Pill( Styling is inline Tailwind utilities; ``data-pill`` / ``data-pill-remove`` are JS hooks only (no CSS attached). ``value`` (when set) becomes ``data-value``; extra ``attributes`` are appended to the outer span. + + ``label_slot=True`` wraps the label in a ```` so JS can + fill it when cloning the pill from a server-rendered ``