Documentation
¶
Overview ¶
Package tabs provides tab components following shadcn/ui patterns. Tabs use Alpine.js for state management and support keyboard navigation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TabList ¶
TabList creates a wrapper for tab buttons
Example:
tabs.TabList(
tabs.Tab("tab1", g.Text("Tab 1")),
tabs.Tab("tab2", g.Text("Tab 2")),
)
func TabPanel ¶
TabPanel creates a content panel for a tab
Example:
tabs.TabPanel("overview", g.Text("Overview content here"))
func Tabs ¶
Tabs creates a tabs container with Alpine.js state management
Example:
tabs.Tabs(
tabs.WithDefaultTab("overview"),
tabs.TabList(
tabs.Tab("overview", g.Text("Overview")),
tabs.Tab("details", g.Text("Details")),
),
tabs.TabPanel("overview", g.Text("Overview content")),
tabs.TabPanel("details", g.Text("Details content")),
)
Types ¶
type Option ¶
type Option func(*TabsProps)
Option is a functional option for configuring tabs
func WithDefaultTab ¶
WithDefaultTab sets the initially active tab
func WithOrientation ¶
func WithOrientation(o Orientation) Option
WithOrientation sets the tab orientation
type Orientation ¶
type Orientation string
Orientation defines tab layout direction
const ( OrientationHorizontal Orientation = "horizontal" OrientationVertical Orientation = "vertical" )
Click to show internal directories.
Click to hide internal directories.