templUI Pro coming soon  

50% OFF Join Waitlist

Drawer

Side-anchored panel that slides in from screen edges.

Source
TailwindCSS
Vanilla JS

Installation

  1. Install the component

    templui add drawer
  2. Add the JavaScript to your layout

    @drawer.Script()
    

    Call this template in your base layout file (e.g., in the <head> section).

Examples

Positions

API Reference

Required parameter
Hover for description

Trigger

Name Type Default
ID
string
""
Class
string
""
Attributes
templ.Attributes
nil
For
string
""

Content

Name Type Default
ID
string
randomID
Class
string
""
Attributes
templ.Attributes
nil
Position
Position
""
InitialOpen
bool
false

Title

Name Type Default
ID
string
""
Class
string
""
Attributes
templ.Attributes
nil

Description

Name Type Default
ID
string
""
Class
string
""
Attributes
templ.Attributes
nil

Close

Name Type Default
ID
string
""
Class
string
""
Attributes
templ.Attributes
nil
For
string
""