drawer

package
v0.0.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(props ...ContentProps) templ.Component

Content renders the main content area of the drawer.

func Drawer

func Drawer(props Props) templ.Component

Drawer renders a DaisyUI drawer controlled by Datastar signals. On large screens the sidebar is always visible (lg:drawer-open). On small screens it toggles via signals.

func Side

func Side(props SideProps) templ.Component

Side renders the sidebar panel.

func ToggleButton

func ToggleButton(drawerID string) templ.Component

ToggleButton renders a hamburger button that toggles the drawer. Only visible on small screens (hidden on lg: when drawer is always open).

Types

type ContentProps

type ContentProps struct {
	Class      string
	Attributes templ.Attributes
}

ContentProps configures the main content area.

type DrawerSignals

type DrawerSignals struct {
	Open bool `json:"open"`
}

DrawerSignals holds the reactive state for a drawer.

type Position

type Position string
const (
	PositionDefault Position = ""
	PositionEnd     Position = "drawer-end"
)

type Props

type Props struct {
	ID         string
	Class      string
	Attributes templ.Attributes
	Position   Position
}

Props configures the drawer container.

type SideProps

type SideProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}

SideProps configures the sidebar panel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL