tab

package
v0.0.39 Latest Latest
Warning

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

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

Documentation

Overview

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

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

Content renders a tab-content panel (used after a RadioTab).

func RadioTab

func RadioTab(props RadioTabProps) templ.Component

RadioTab renders a radio input tab that pairs with a Content panel.

func Tab

func Tab(props ...TabProps) templ.Component

Tab renders a link-based tab item.

func Tabs

func Tabs(props ...Props) templ.Component

Tabs renders a tab container.

Types

type ContentProps

type ContentProps struct {
	Class      string
	Attributes templ.Attributes
}

type Props

type Props struct {
	ID         string
	Class      string
	Attributes templ.Attributes
	Variant    Variant
	Size       Size
}

type RadioTabProps

type RadioTabProps struct {
	Class      string
	Attributes templ.Attributes
	Name       string
	Label      string
	Checked    bool
}

type Size

type Size string
const (
	SizeDefault Size = ""
	SizeXs      Size = "tabs-xs"
	SizeSm      Size = "tabs-sm"
	SizeMd      Size = "tabs-md"
	SizeLg      Size = "tabs-lg"
	SizeXl      Size = "tabs-xl"
)

type TabProps

type TabProps struct {
	Class      string
	Attributes templ.Attributes
	Active     bool
	Disabled   bool
	Href       string
}

type Variant

type Variant string
const (
	VariantDefault Variant = ""
	VariantBorder  Variant = "tabs-border"
	VariantLift    Variant = "tabs-lift"
	VariantBox     Variant = "tabs-box"
)

Jump to

Keyboard shortcuts

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