sidebar

package
v0.0.0-...-878bea8 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

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

func Group

func Group(props ...GroupProps) templ.Component

func GroupLabel

func GroupLabel(props ...GroupLabelProps) templ.Component
func Header(props ...HeaderProps) templ.Component

func Inset

func Inset(props ...InsetProps) templ.Component

func Layout

func Layout(props ...LayoutProps) templ.Component
func Menu(props ...MenuProps) templ.Component
func MenuBadge(props ...MenuBadgeProps) templ.Component
func MenuButton(props ...MenuButtonProps) templ.Component
func MenuItem(props ...MenuItemProps) templ.Component
func MenuSub(props ...MenuSubProps) templ.Component
func MenuSubButton(props ...MenuSubButtonProps) templ.Component
func MenuSubItem(props ...MenuSubItemProps) templ.Component

func Script

func Script() templ.Component

func Separator

func Separator(props ...SeparatorProps) templ.Component
func Sidebar(props ...Props) templ.Component

func Trigger

func Trigger(props ...TriggerProps) templ.Component

Types

type Collapsible

type Collapsible string
const (
	CollapsibleOffcanvas Collapsible = "offcanvas" // default
	CollapsibleIcon      Collapsible = "icon"
	CollapsibleNone      Collapsible = "none"
)

type ContentProps

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

type FooterProps

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

type GroupLabelProps

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

type GroupProps

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

type HeaderProps

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

type InsetProps

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

type LayoutProps

type LayoutProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}
type MenuBadgeProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}
type MenuButtonProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
	Href       string
	IsActive   bool
	Size       MenuButtonSize // default: "default"
	Tooltip    string         // Tooltip text to show when sidebar is collapsed
}
type MenuButtonSize string
const (
	MenuButtonSizeDefault MenuButtonSize = "default" // default
	MenuButtonSizeSm      MenuButtonSize = "sm"
	MenuButtonSizeLg      MenuButtonSize = "lg"
)
type MenuItemProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}
type MenuProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}
type MenuSubButtonProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
	Href       string
	IsActive   bool
}
type MenuSubItemProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}
type MenuSubProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}

type Props

type Props struct {
	ID               string
	Class            string
	Attributes       templ.Attributes
	Side             Side        // default: "left"
	Variant          Variant     // default: "sidebar"
	Collapsible      Collapsible // default: "offcanvas"
	Collapsed        bool        // default: false (sidebar open)
	KeyboardShortcut string      // default: "b"
}

type SeparatorProps

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

type Side

type Side string
const (
	SideLeft  Side = "left" // default
	SideRight Side = "right"
)

type TriggerProps

type TriggerProps struct {
	ID         string
	Class      string
	Attributes templ.Attributes
	Target     string // Target sidebar ID to toggle
}

type Variant

type Variant string
const (
	VariantSidebar  Variant = "sidebar" // default
	VariantFloating Variant = "floating"
	VariantInset    Variant = "inset"
)

Jump to

Keyboard shortcuts

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