ToggleButton
A button that stays pressed, with aria-pressed and data-selected.
Not pinned.
<script>
import { $bind, $signal } from 'brumate/signals';
import ToggleButton from '@brumate/ui/ToggleButton.brm';
let pinned = $signal(false);
</script>
<ToggleButton class="ui-button" isSelected=$bind(pinned)>Pin</ToggleButton>
<p>{pinned ? 'Pinned' : 'Not pinned'}.</p>
isSelectedis its state. See State.- It takes the props of a Button, and shows its attributes.
- In a ToggleButtonGroup, it names itself with
id, and the group keeps its state.