PyBlade/ui
Menu⌄
DocsComponentsDrawer

Drawer

A panel that rises from the bottom; drag its handle down to close it.

Alpine.jsdepends on button6 files

Installation

pyblade-ui add drawer

Usage

The tags <pb-ui.drawer> <pb-ui.drawer-header> <pb-ui.drawer-footer> <pb-ui.drawer-title> <pb-ui.drawer-description> <pb-ui.drawer-close> are available in all your templates.

<pb-ui.drawer>
  <pb-slot:trigger><pb-ui.button variant="outline">Open</pb-ui.button></pb-slot:trigger>
  <pb-ui.drawer-header>
    <pb-ui.drawer-title>Move goal</pb-ui.drawer-title>
    <pb-ui.drawer-description>Set your daily activity goal.</pb-ui.drawer-description>
  </pb-ui.drawer-header>
  <pb-ui.drawer-footer>
    <pb-ui.drawer-close><pb-ui.button variant="outline">Cancel</pb-ui.button></pb-ui.drawer-close>
  </pb-ui.drawer-footer>
</pb-ui.drawer>

Props

PropDefault
name''
trigger''
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.