Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Navbar ¶
Navbar creates a responsive navigation bar with mobile menu
Example:
menu.Navbar(
menu.NavbarBrand(g.Text("My App")),
menu.NavbarMenu(
menu.Item("/", g.Text("Home"), menu.Active()),
menu.Item("/about", g.Text("About")),
),
menu.NavbarActions(
button.Ghost(g.Text("Sign In")),
),
)
func NavbarActions ¶
NavbarActions creates the right-side actions section
Example:
menu.NavbarActions(
button.Ghost(g.Text("Sign In")),
button.Primary(g.Text("Sign Up")),
)
func NavbarBrand ¶
NavbarBrand creates the brand/logo section
Example:
menu.NavbarBrand(
html.Img(g.Attr("src", "/logo.svg"), g.Attr("alt", "Logo")),
g.Text("My App"),
)
func NavbarMenu ¶
NavbarMenu creates the navigation links section On mobile, this appears in the drawer
Example:
menu.NavbarMenu(
menu.Item("/", g.Text("Home")),
menu.Item("/docs", g.Text("Docs")),
)
func NavbarWithOptions ¶
func NavbarWithOptions(opts []NavbarOption, children ...g.Node) g.Node
NavbarWithOptions creates navbar with custom options
Types ¶
type NavbarOption ¶
type NavbarOption func(*NavbarProps)
NavbarOption is a functional option for configuring navbar
func WithNavbarAttrs ¶
func WithNavbarAttrs(attrs ...g.Node) NavbarOption
WithNavbarAttrs adds custom attributes to navbar
func WithNavbarClass ¶
func WithNavbarClass(class string) NavbarOption
WithNavbarClass adds custom classes to navbar
func WithTransparent ¶
func WithTransparent() NavbarOption
WithTransparent makes navbar background transparent
Click to show internal directories.
Click to hide internal directories.