body

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package body provides helpers for building attributes for <body> elements in templ components. It wraps props.Attrs and exposes methods for safely passing attributes to templ elements.

Copyright 2025 Deirror. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body added in v0.5.0

func Body(ps ...Props) templ.Component

Types

type Props

type Props struct {
	props.Attrs
}

Props wraps props.Attrs to provide a typed container for <body> attributes.

func (Props) AsTemplAttrs

func (p Props) AsTemplAttrs() templ.Attributes

AsTemplAttrs returns the wrapped attributes as templ.Attributes for use with templ elements.

Jump to

Keyboard shortcuts

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