Using Datastar Signals for front-end reactivity
Active Tabs
Set a signal for the active tab name. Then, each tab sets the name that is clicked. The contents show/hide based on the name.
Local counter
Set a signal for the counter, then show it and add one button to decrease and one button to increase.
Drop-down on hover
This uses two signals: hoverbutton and hovermenu. We set them with data-on-mouseover and data-on-mouseleave. If you are hovering over either, show the menu.
Global toggle
Signals are global to the entire DOM, so you can control anywhere on the page. In this case two toggles are set to the same signal.