PyBlade/ui
Menu⌄
DocsComponentsCollapsible

Collapsible

A section that shows and hides its content.

Alpine.jsdepends on button3 files

Installation

pyblade-ui add collapsible

Usage

The tags <pb-ui.collapsible> <pb-ui.collapsible-trigger> <pb-ui.collapsible-content> are available in all your templates.

<pb-ui.collapsible>
  <pb-ui.collapsible-trigger><pb-ui.button variant="ghost">Toggle</pb-ui.button></pb-ui.collapsible-trigger>
  <pb-ui.collapsible-content>Hidden content</pb-ui.collapsible-content>
</pb-ui.collapsible>

Props

PropDefault
openFalse

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