Help us shape the future of Go! Take the 2026 Go Developer Survey

flash

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Banner(failure view.Failure) templ.Component

Banner renders a dismissible error banner with its Details section, or nothing for an empty failure.

Parameters:

  • failure: The message and its details.

func Details added in v0.4.0

func Details(details string) templ.Component

Details renders an error's technical details in a collapsed section.

The details show as selectable text with a copy button, and nothing renders when there are none. The text stays selectable by hand where the browser offers no clipboard, such as a page opened over plain HTTP on a LAN address.

Parameters:

  • details: The technical report.

func DetailsSlot added in v0.4.0

func DetailsSlot(id string) templ.Component

DetailsSlot renders an empty, hidden Details section that a script fills in when a failure it polls for arrives, such as a failed preview.

Parameters:

  • id: The section's id, which the script looks it up by.

func OutOfBand added in v0.3.1

func OutOfBand(failure view.Failure) templ.Component

OutOfBand renders the banner as an out-of-band swap of the flash slot.

Parameters:

  • failure: The message and its details.

func Partial

func Partial(failure view.Failure) templ.Component

Partial renders the banner for an HTMX error response targeting the slot.

Parameters:

  • failure: The message and its details.

func Slot

func Slot(failure view.Failure) templ.Component

Slot renders the banner target that HTMX swaps a failure into.

Parameters:

  • failure: The failure the page opens with, empty for none.

Types

This section is empty.

Jump to

Keyboard shortcuts

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