huntabyte / bits-ui

The headless components for Svelte.
https://bits-ui.com
MIT License
953 stars 70 forks source link

Add mousedown / mouseup events to relevant bits. #546

Open caschbre opened 1 month ago

caschbre commented 1 month ago

Describe the feature in detail (code, mocks, or screenshots encouraged)

The current bits button is only exposing the following events...

on:click
on:change
on:keydown
on:keyup
on:mouseenter
on:mouseleave

Would it be possible to also add

on:mousedown
on:mouseup

What type of pull request would this be?

None

Provide relevant links or additional information.

No response

huntabyte commented 1 month ago

Works for me! Can't wait until Svelte 5 so that we don't have to manually expose all of these listeners 😃