Documentation ¶
Index ¶
- Variables
- type KeyMap
- type Model
- func (m Model) DefaultDimensions() Model
- func (m Model) Height(h int) Model
- func (m Model) Init() tea.Cmd
- func (m Model) NextTab() Model
- func (m Model) PreviousTab() Model
- func (m Model) SetTab(i int) Model
- func (m Model) Styles(styles Styles) Model
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m Model) View() string
- func (m Model) ViewTabs() string
- func (m Model) ViewWindow(w int) string
- func (m Model) Width(w int) Model
- func (m Model) Wraparound(w bool) Model
- type Styles
- type Tab
- type TabSizeMsg
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultForegroundColor = gloss.AdaptiveColor{Light: "#874Bfd", Dark: "#7d56f4"} DefaultUnfocusedColor = gloss.AdaptiveColor{Light: "#3a3a3a", Dark: "#b0b0b0"} DefaultActiveTabIndicatorColor = gloss.AdaptiveColor{Light: "#bb99fe", Dark: "#997bf6"} DefaultWindowBorder = gloss.Border{ Top: " ", Bottom: "─", Left: "│", Right: "│", TopLeft: "│", TopRight: "│", BottomLeft: "└", BottomRight: "┘", } DefaultTabBorder = gloss.Border{ Top: "─", Bottom: "─", Left: "│", Right: "│", TopLeft: "╭'", TopRight: "╮", BottomLeft: "┴", BottomRight: "┴", } DefaultActiveTabBorder = gloss.Border{ Top: "─", Bottom: " ", Left: "│", Right: "│", TopLeft: "╭'", TopRight: "╮", BottomLeft: "┘", BottomRight: "└", } DefaultTabSpacerBorder = gloss.Border{ Bottom: "─", BottomRight: "┐", } )
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
KeyMap contains relevant keys for tab navigation.
func DefaultKeyMap ¶
DefaultKeyMap contains default key mappings for tab navigation.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents a group of tab headers and their content.
func (Model) DefaultDimensions ¶
DefaultDimensions applies the current terminal's dimensions to the tab group.
func (Model) PreviousTab ¶
PreviousTab moves the active tab backward.
func (Model) ViewWindow ¶
ViewWindow renders the tab window.
func (Model) Wraparound ¶
Wraparound enables or disables wraparound navigation from the last tab to the first tab and from the first tab back to the last tab.
type Styles ¶
type Styles struct { // Inactive tab header Tab gloss.Style // Active tab header ActiveTab gloss.Style // Gap between rightmost tab header and right side of screen TabSpacer gloss.Style // Area to left and right of active tab header title TabIndicator gloss.Style // Character(s) to left of active tab header title TabIndicatorLeft string // Character(s) to right of active tab header title TabIndicatorRight string // Tab content TabWindow gloss.Style }
Styles for tab rendering.
Click to show internal directories.
Click to hide internal directories.