PyBlade/ui
Menu⌄
DocsComponentsToggle

Toggle

A two-state button that can be on or off.

Alpine.js1 file

Installation

pyblade-ui add toggle

Usage

The tag <pb-ui.toggle> is available in all your templates.

<pb-ui.toggle variant="outline" aria-label="Bold">B</pb-ui.toggle>

Examples

Variants

Props

PropDefault
pressedFalse
variant'default'
size'default'

Any other attribute (class, id, x-on:click, hx-post…) is passed to the root element; your Tailwind classes win over the component's.