Ship faster with goilerplate templUI Pro

Sheet

Extends the Dialog component to display content that complements the main content of the screen.

Source Tailwind CSS JavaScript

Edit profile

Make changes to your profile here. Click save when you're done.

Examples

Sheet Sides

Top Sheet

This slides in from the top.

Content for the top sheet.

Right Sheet

This slides in from the right.

Content for the right sheet.

Bottom Sheet

This slides in from the bottom.

Content for the bottom sheet.

Left Sheet

This slides in from the left.

Content for the left sheet.

External Trigger

External Trigger

This sheet has no internal trigger

The trigger button exists outside the Sheet component.

Standalone Content

Standalone Content

No wrapper component needed

Useful for HTMX or dynamic content loading.

Installation

  1. Install the component

    templui add sheet
  2. Add the JavaScript to your layout

    @dialog.Script()
    

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

API Reference

Required parameter
Hover for description

Sheet

Name Type Default
ID
string
randomID
Class
string
""
Attributes
templ.Attributes
nil
Side
Side
SideRight
Open
bool
false
DisableClickAway
bool
false
DisableESC
bool
false

Trigger

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

Content

Name Type Default
Class
string
""
Attributes
templ.Attributes
nil
HideCloseButton
bool
false
ID
string
""
Side
Side
SideRight
Open
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