utils

package
v0.89.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package utils provides utility functions for the components package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Coalesce

func Coalesce(components ...templ.Component) templ.Component

Coalesce renders only the first component that is not empty. This is useful for rendering variants of a component (e.g. regime-specific), falling back to a default version. This allows to encapsulate the conditional logic to render a variant in the variant component itself.

Types

This section is empty.

Jump to

Keyboard shortcuts

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