diff --git a/.changeset/polite-dogs-change.md b/.changeset/polite-dogs-change.md new file mode 100644 index 000000000..671aec0e3 --- /dev/null +++ b/.changeset/polite-dogs-change.md @@ -0,0 +1,5 @@ +--- +"bits-ui": patch +--- + +DropdownMenu.Trigger `type="button"` by default diff --git a/packages/bits-ui/src/lib/bits/menu/components/menu-trigger.svelte b/packages/bits-ui/src/lib/bits/menu/components/menu-trigger.svelte index b1334f1a2..a3ad42a7d 100644 --- a/packages/bits-ui/src/lib/bits/menu/components/menu-trigger.svelte +++ b/packages/bits-ui/src/lib/bits/menu/components/menu-trigger.svelte @@ -11,6 +11,7 @@ child, children, disabled = false, + type = "button", ...restProps }: MenuTriggerProps = $props(); @@ -23,7 +24,7 @@ ), }); - const mergedProps = $derived(mergeProps(restProps, triggerState.props)); + const mergedProps = $derived(mergeProps(restProps, triggerState.props, { type }));