Sheet
Extends the Dialog component to display content that complements the main content of the screen.
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
Install the component
templui add sheetAdd the JavaScript to your layout
@dialog.Script()Call this template in your base layout file (e.g., in the <head> section).
API Reference
Sheet
| Name | Type | Default |
|---|---|---|
Unique identifier for the sheet (auto-generated if not provided) | | |
Additional CSS classes to apply to the sheet wrapper | | |
Additional HTML attributes to apply to the sheet wrapper | | |
Side from which the sheet slides in (top, right, bottom, left) | | |
Whether the sheet should be open initially | | |
Disable closing the sheet when clicking the backdrop | | |
Disable closing the sheet with the ESC key | | |
Trigger
| Name | Type | Default |
|---|---|---|
Unique identifier for the trigger element | | |
Additional CSS classes to apply to the trigger | | |
Additional HTML attributes to apply to the trigger | | |
ID of the sheet to trigger (for external triggers outside Sheet wrapper) | | |
Content
| Name | Type | Default |
|---|---|---|
Additional CSS classes to apply to the content container | | |
Additional HTML attributes to apply to the content container | | |
Hide the close X button in the top right corner | | |
Sheet ID for standalone usage (when not wrapped in Sheet component) | | |
Side for standalone usage (when not wrapped in Sheet component) | | |
Initial open state for standalone usage (when not wrapped in Sheet component) | | |
Header
| Name | Type | Default |
|---|---|---|
Unique identifier for the header element | | |
Additional CSS classes to apply to the header | | |
Additional HTML attributes to apply to the header | | |
Title
| Name | Type | Default |
|---|---|---|
Unique identifier for the title element | | |
Additional CSS classes to apply to the title | | |
Additional HTML attributes to apply to the title | | |
Description
| Name | Type | Default |
|---|---|---|
Unique identifier for the description element | | |
Additional CSS classes to apply to the description | | |
Additional HTML attributes to apply to the description | | |
Close
| Name | Type | Default |
|---|---|---|
Unique identifier for the close button | | |
Additional CSS classes to apply to the close button | | |
Additional HTML attributes to apply to the close button | | |