menu

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: 3 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Item

func Item(props ...ItemProps) templ.Component

Item renders a menu item with an optional link.

func Menu(props ...Props) templ.Component

Menu renders a DaisyUI menu container.

func Title

func Title(props ...TitleProps) templ.Component

Title renders a menu section title.

Types

type Direction

type Direction string
const (
	DirectionDefault    Direction = ""
	DirectionVertical   Direction = "menu-vertical"
	DirectionHorizontal Direction = "menu-horizontal"
)

type ItemProps

type ItemProps struct {
	Href       string
	Active     bool
	Disabled   bool
	Class      string
	Attributes templ.Attributes
}

ItemProps configures a single menu item.

type Props

type Props struct {
	ID         string
	Class      string
	Attributes templ.Attributes
	Size       Size
	Direction  Direction
}

Props configures a DaisyUI menu.

type Size

type Size string
const (
	SizeDefault Size = ""
	SizeXs      Size = "menu-xs"
	SizeSm      Size = "menu-sm"
	SizeMd      Size = "menu-md"
	SizeLg      Size = "menu-lg"
	SizeXl      Size = "menu-xl"
)

type TitleProps

type TitleProps struct {
	Class      string
	Attributes templ.Attributes
}

TitleProps configures a menu section title.

Jump to

Keyboard shortcuts

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