sidebar

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content added in v1.1.0

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

func Group added in v1.1.0

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

func GroupLabel added in v1.1.0

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

func Inset added in v1.1.0

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

func Layout added in v1.1.0

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 added in v1.1.0

func Script() templ.Component

func Separator added in v1.1.0

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

func Trigger added in v1.1.0

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

Types

type Collapsible added in v1.1.0

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

type ContentProps added in v1.1.0

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

type FooterProps added in v1.1.0

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

type GroupLabelProps added in v1.1.0

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

type GroupProps added in v1.1.0

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

type HeaderProps added in v1.1.0

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

type InsetProps added in v1.1.0

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

type LayoutProps added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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

type Side added in v1.1.0

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

type TriggerProps added in v1.1.0

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

type Variant added in v1.1.0

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