bootstrap

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EventMediaPlayPause = "media-playpause"
	EventMediaStop      = "media-stop"
	EventMediaSeek      = "media-seek"
	EventMediaTime      = "media-time"
)
View Source
const (
	// All border positions
	BorderAll = Top | Bottom | Start | End

	// All margin positions
	MarginAll = Top | Bottom | Start | End

	// All padding positions
	PaddingAll = Top | Bottom | Start | End

	// All Offcanvas positions
	OffcanvasAll = Start | End | Top | Bottom

	// All Navbar positions
	NavbarAll = Top | Bottom
)
View Source
const (
	ViewAccordion      = "mvc-bs-accordion"
	ViewAccordionItem  = "mvc-bs-accordionitem"
	ViewAlert          = "mvc-bs-alert"
	ViewBadge          = "mvc-bs-badge"
	ViewButton         = "mvc-bs-button"
	ViewButtonGroup    = "mvc-bs-buttongroup"
	ViewButtonToolbar  = "mvc-bs-buttontoolbar"
	ViewCard           = "mvc-bs-card"
	ViewCardGroup      = "mvc-bs-cardgroup"
	ViewCarousel       = "mvc-bs-carousel"
	ViewCarouselItem   = "mvc-bs-carouselitem"
	ViewCheckboxGroup  = "mvc-bs-checkboxgroup"
	ViewCodeBlock      = "mvc-bs-codeblock"
	ViewContainer      = "mvc-bs-container"
	ViewDefinitionList = "mvc-bs-deflist"
	ViewForm           = "mvc-bs-form"
	ViewGrid           = "mvc-bs-grid"
	ViewHeading        = "mvc-bs-heading"
	ViewIcon           = "mvc-bs-icon"
	ViewImage          = "mvc-bs-img"
	ViewInput          = "mvc-bs-input"
	ViewInputGroup     = "mvc-bs-inputgroup"
	ViewLink           = "mvc-bs-link"
	ViewList           = "mvc-bs-list"
	ViewListGroup      = "mvc-bs-listgroup"
	ViewMarkdown       = "mvc-bs-markdown"
	ViewModal          = "mvc-bs-modal"
	ViewMedia          = "mvc-bs-media"
	ViewMediaControl   = "mvc-bs-mediacontrol"
	ViewNavBar         = "mvc-bs-navbar"
	ViewNavDropdown    = "mvc-bs-navdropdown"
	ViewNavItem        = "mvc-bs-navitem"
	ViewOffcanvas      = "mvc-bs-offcanvas"
	ViewPagination     = "mvc-bs-pagination"
	ViewPaginationItem = "mvc-bs-paginationitem"
	ViewProgress       = "mvc-bs-progress"
	ViewRadioGroup     = "mvc-bs-radiogroup"
	ViewRule           = "mvc-bs-rule"
	ViewSelect         = "mvc-bs-select"
	ViewTable          = "mvc-bs-table"
	ViewTableRow       = "mvc-bs-tablerow"
	ViewText           = "mvc-bs-text"
	ViewToast          = "mvc-bs-toast"
	ViewToastGroup     = "mvc-bs-toastgroup"
)

The view names for Bootstrap components

Variables

This section is empty.

Functions

func Alert added in v0.0.2

func Alert(args ...any) *alert

func Badge

func Badge(args ...any) *badge

func Blockquote

func Blockquote(args ...any) *text

func BulletList

func BulletList(args ...any) mvc.View

func Button added in v0.0.2

func Button(args ...any) *button

func ButtonGroup added in v0.0.2

func ButtonGroup(args ...any) mvc.View

func ButtonToolbar added in v0.0.2

func ButtonToolbar(args ...any) mvc.View

func Card added in v0.0.2

func Card(args ...any) *card

func CardGroup added in v0.0.2

func CardGroup(args ...any) *cardgroup
func Carousel(id string, args ...any) *carousel

func CarouselItem

func CarouselItem(args ...any) *carouselitem

func CloseButton added in v0.0.2

func CloseButton(args ...any) *button

func Code

func Code(args ...any) *text

func CodeBlock

func CodeBlock(args ...any) *codeblock

func Col

func Col(args ...any) *grid

func Col2

func Col2(args ...any) *grid

func Col3

func Col3(args ...any) *grid

func Col4

func Col4(args ...any) *grid

func Col5

func Col5(args ...any) *grid

func Col6

func Col6(args ...any) *grid

func Col8

func Col8(args ...any) *grid

func Col9

func Col9(args ...any) *grid

func Col10

func Col10(args ...any) *grid

func Col12

func Col12(args ...any) *grid

func Container

func Container(args ...any) mvc.View

func DefinitionList

func DefinitionList(args ...any) mvc.View

func Deleted

func Deleted(args ...any) *text

func Em

func Em(args ...any) *text

func FluidContainer

func FluidContainer(args ...any) mvc.View

func Form added in v0.0.2

func Form(name string, args ...any) *form

func HRule

func HRule(args ...any) *rule

func Heading

func Heading(level int, args ...any) mvc.View

func Highlighted

func Highlighted(args ...any) *text

func Icon

func Icon(name string, args ...any) mvc.View
func IconLink(href string, args ...any) mvc.View

func Image

func Image(href string, args ...any) *img

func Input

func Input(name string, args ...any) *input

func LeadPara

func LeadPara(args ...any) *text
func Link(href string, args ...any) mvc.View

func List

func List(args ...any) mvc.View

func ListGroup

func ListGroup(args ...any) mvc.View

func Markdown

func Markdown(text string) mvc.View

Markdown creates a block-level markdown view using a DIV root element

func MediaControl added in v0.0.2

func MediaControl(args ...any) *mediacontrol
func Modal(id string, args ...any) *modal
func NavBar(id string, args ...any) *navbar
func NavDivider() *navitem
func NavDropdown(args ...any) *navdropdown
func NavItem(href string, args ...any) *navitem

func Offcanvas added in v0.0.2

func Offcanvas(id string, args ...any) *offcanvas

func Option

func Option(name, value string) *option

func OutlineButton added in v0.0.2

func OutlineButton(args ...any) *button

func Para

func Para(args ...any) *text

func PillBadge

func PillBadge(args ...any) *badge

func RangeInput added in v0.0.2

func RangeInput(name string, args ...any) *input

func Row

func Row(args ...any) *grid

func SearchInput

func SearchInput(name string, args ...any) *input

func SecureInput added in v0.0.2

func SecureInput(name string, args ...any) *input

func Smaller

func Smaller(args ...any) *text

func StickyModal added in v0.0.2

func StickyModal(id string, args ...any) *modal

func StickyOffcanvas added in v0.0.2

func StickyOffcanvas(id string, args ...any) *offcanvas

func Strong

func Strong(args ...any) *text

func Table added in v0.0.2

func Table(args ...any) *table

func TableRow added in v0.0.2

func TableRow(args ...any) *tablerow

func Toast added in v0.0.2

func Toast(args ...any) *toast

func ToastGroup added in v0.0.2

func ToastGroup(args ...any) *toastgroup

func UnstyledList

func UnstyledList(args ...any) mvc.View

func VButtonGroup added in v0.0.2

func VButtonGroup(args ...any) mvc.View

func VRule

func VRule(args ...any) *rule

func Video

func Video(src string, args ...any) *media

func WithActive

func WithActive(active bool) mvc.Opt

WithActive adds an active attribute to a view

func WithActiveToggle

func WithActiveToggle() mvc.Opt

WithActiveToggle adds an active attribute to a view, and allows for toggling of the state

func WithAutoplay

func WithAutoplay() mvc.Opt

func WithBorder

func WithBorder(colors ...Color) mvc.Opt

func WithColor

func WithColor(color Color) mvc.Opt

func WithDisabled

func WithDisabled(disabled bool) mvc.Opt

WithDisabled adds a disabled attribute to a view

func WithFlex

func WithFlex(position Position) mvc.Opt

func WithMinMax added in v0.0.2

func WithMinMax(min, max int) mvc.Opt

Range inputs can set a minimum and maximum value

func WithModal added in v0.0.2

func WithModal(id string) mvc.Opt

WithModal returns an option which configures a button to open the modal with the given ID

func WithOffcanvas added in v0.0.2

func WithOffcanvas(id string) mvc.Opt

WithOffcanvas returns an option which configures a button to open the offcanvas with the given ID

func WithOffcanvasScroll added in v0.0.2

func WithOffcanvasScroll() mvc.Opt

Use WithOffcanvasScroll to enable <body> scrolling.

func WithPlaceholder

func WithPlaceholder(placeholder string) mvc.Opt

func WithPosition

func WithPosition(position Position) mvc.Opt

func WithRowHover added in v0.0.2

func WithRowHover() mvc.Opt

func WithSize

func WithSize(size Size) mvc.Opt

func WithStripedColumns added in v0.0.2

func WithStripedColumns() mvc.Opt

func WithStripedRows added in v0.0.2

func WithStripedRows() mvc.Opt

func WithSubmit added in v0.0.2

func WithSubmit() mvc.Opt

func WithTheme

func WithTheme(color Color) mvc.Opt

func WithToggle added in v0.0.2

func WithToggle() mvc.Opt

func WithoutBorder

func WithoutBorder() mvc.Opt

func WithoutControls

func WithoutControls() mvc.Opt

func WithoutFullscreen

func WithoutFullscreen() mvc.Opt

func WithoutKeyboardControls

func WithoutKeyboardControls() mvc.Opt

func WithoutRowHover added in v0.0.2

func WithoutRowHover() mvc.Opt

func YouTube

func YouTube(id string, args ...any) *media

Types

type Color

type Color string

Color defines the color for components and backgrounds

const (
	Transparent     Color = ""
	Primary         Color = "primary"
	PrimarySubtle   Color = "primary-subtle"
	Secondary       Color = "secondary"
	SecondarySubtle Color = "secondary-subtle"
	Success         Color = "success"
	SuccessSubtle   Color = "success-subtle"
	Danger          Color = "danger"
	DangerSubtle    Color = "danger-subtle"
	Warning         Color = "warning"
	WarningSubtle   Color = "warning-subtle"
	Info            Color = "info"
	InfoSubtle      Color = "info-subtle"
	Light           Color = "light"
	LightSubtle     Color = "light-subtle"
	Dark            Color = "dark"
	DarkSubtle      Color = "dark-subtle"
	White           Color = "white"
	Black           Color = "black"
)

type DataView added in v0.0.2

type DataView interface {
	Value() any
}

Return the value associated with the view

type Position

type Position uint

Position defines the position for borders and alignment

const (
	Top Position = 1 << iota
	Bottom
	Start
	End
	Center
	Middle
	Sticky
	None Position = 0
)

func (Position) Is

func (position Position) Is(flag Position) bool

type Size

type Size string

Size defines button sizes

const (
	Small   Size = "sm"
	Medium  Size = "md"
	Large   Size = "lg"
	XLarge  Size = "xl"
	XXLarge Size = "xxl"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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