loader

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

templ: version: v0.3.943

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loader

func Loader(props ...LoaderProps) templ.Component

Loader renders an animated loading spinner.

This component renders Bulma's .loader class as a div element, which creates a circular spinning animation to indicate loading states. Commonly used in buttons (with .is-loading), form controls, or as standalone loading indicators. Includes proper ARIA attributes for accessibility and screen reader support.

Types

type LoaderProps

type LoaderProps struct {
	// Optional HTML id attribute for the loader element
	ID string

	// List of additional CSS classes to apply to the loader
	Class []string

	// Additional arbitrary HTML attributes
	Attributes templ.Attributes

	// Accessible label for screen readers (defaults to "Loading")
	AriaLabel string
}

LoaderProps defines configuration for loader elements.

Use this type to configure Bulma .loader elements which provide animated loading spinners. The loader is typically used as an overlay or within buttons and form controls to indicate loading states. Includes proper accessibility attributes for screen readers.

Jump to

Keyboard shortcuts

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