) => {
+ if (this.disabled) return;
+ e.preventDefault();
+ e.stopPropagation();
+ this.provider.removeValue(this.tag.opts.value.current);
+ };
+
+ readonly props = $derived.by(() =>
+ this.runtimePart.assert({
+ ...this.runtimePart.props,
+ type: 'button' as const,
+ 'data-disabled': boolToEmptyStrOrUndef(this.disabled),
+ disabled: this.disabled || undefined,
+ onclick: this.onclick
+ } as const)
+ );
+}
+
// ── ClearButton ─────────────────────────────────────────────────────────────
interface ComboboxClearButtonOpts extends WithRefOpts {}
diff --git a/src/uix/soma/components/combobox/components/combobox-selected-tag-remove.svelte b/src/uix/soma/components/combobox/components/combobox-selected-tag-remove.svelte
new file mode 100644
index 000000000..a46c2276e
--- /dev/null
+++ b/src/uix/soma/components/combobox/components/combobox-selected-tag-remove.svelte
@@ -0,0 +1,35 @@
+
+
+{#if child}
+ {@render child({ props: mergedProps })}
+{:else}
+
+{/if}
diff --git a/src/uix/soma/components/combobox/components/combobox-selected-tag.svelte b/src/uix/soma/components/combobox/components/combobox-selected-tag.svelte
new file mode 100644
index 000000000..77e3227af
--- /dev/null
+++ b/src/uix/soma/components/combobox/components/combobox-selected-tag.svelte
@@ -0,0 +1,41 @@
+
+
+{#if child}
+ {@render child({ props: mergedProps })}
+{:else}
+
+ {@render children?.()}
+
+{/if}
diff --git a/src/uix/soma/components/combobox/components/combobox-selected-tags.svelte b/src/uix/soma/components/combobox/components/combobox-selected-tags.svelte
new file mode 100644
index 000000000..dff3f8501
--- /dev/null
+++ b/src/uix/soma/components/combobox/components/combobox-selected-tags.svelte
@@ -0,0 +1,36 @@
+
+
+{#if child}
+ {@render child({ props: mergedProps, ...snippetProps })}
+{:else}
+
+ {@render children?.(snippetProps)}
+
+{/if}
diff --git a/src/uix/soma/components/combobox/exports.ts b/src/uix/soma/components/combobox/exports.ts
index 9d342808c..7eb6eff4d 100644
--- a/src/uix/soma/components/combobox/exports.ts
+++ b/src/uix/soma/components/combobox/exports.ts
@@ -9,6 +9,9 @@ export { default as GroupHeading } from './components/combobox-group-heading.sve
export { default as Separator } from './components/combobox-separator.svelte';
export { default as Arrow } from './components/combobox-arrow.svelte';
export { default as ClearButton } from './components/combobox-clear-button.svelte';
+export { default as SelectedTags } from './components/combobox-selected-tags.svelte';
+export { default as SelectedTag } from './components/combobox-selected-tag.svelte';
+export { default as SelectedTagRemove } from './components/combobox-selected-tag-remove.svelte';
export type {
ComboboxType,
@@ -22,5 +25,8 @@ export type {
ComboboxGroupHeadingProps as GroupHeadingProps,
ComboboxSeparatorProps as SeparatorProps,
ComboboxArrowProps as ArrowProps,
- ComboboxClearButtonProps as ClearButtonProps
+ ComboboxClearButtonProps as ClearButtonProps,
+ ComboboxSelectedTagsProps as SelectedTagsProps,
+ ComboboxSelectedTagProps as SelectedTagProps,
+ ComboboxSelectedTagRemoveProps as SelectedTagRemoveProps
} from './types';
diff --git a/src/uix/soma/components/combobox/types.ts b/src/uix/soma/components/combobox/types.ts
index 7925f09c1..e914b6671 100644
--- a/src/uix/soma/components/combobox/types.ts
+++ b/src/uix/soma/components/combobox/types.ts
@@ -166,3 +166,41 @@ export type ComboboxClearButtonProps = WithChild<{
id?: string;
}> &
Without;
+
+/**
+ * Container for the inline selected-value chips that render inside
+ * `` when `type === 'multiple'`. The `children` snippet
+ * receives `{ items: Array<{ value, label }> }` — the consumer iterates
+ * and composes one `` per entry.
+ *
+ * In multi mode, hides itself (via `[data-empty]`) when no values are
+ * selected so the control collapses back to plain input chrome.
+ */
+export type ComboboxSelectedTagsProps = WithChild<
+ {
+ /** Unique identifier. Auto-generated if omitted. */
+ id?: string;
+ },
+ { items: Array<{ value: string; label: string }> }
+> &
+ Without;
+
+/** A single chip rendered for one selected value. Hosts label + remove button. */
+export type ComboboxSelectedTagProps = WithChild<{
+ /** Unique identifier. Auto-generated if omitted. */
+ id?: string;
+ /** Required. The value this chip represents. */
+ value: string;
+ /** Display label. Falls back to `value`. */
+ label?: string;
+ /** @default false */
+ disabled?: boolean;
+}> &
+ Without;
+
+/** X button inside a `` that removes its value from the selection. */
+export type ComboboxSelectedTagRemoveProps = WithChild<{
+ /** Unique identifier. Auto-generated if omitted. */
+ id?: string;
+}> &
+ Without;
diff --git a/web/routes/uix/components/combobox/+page.svelte b/web/routes/uix/components/combobox/+page.svelte
index 0d036394d..f35616e91 100644
--- a/web/routes/uix/components/combobox/+page.svelte
+++ b/web/routes/uix/components/combobox/+page.svelte
@@ -266,6 +266,9 @@
name="framework"
>
+ {#if mode === 'multiple'}
+
+ {/if}