html

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: 6 Imported by: 0

Documentation

Overview

Package html provides helpers for building HTML element attributes in templ components.

It combines general attributes (props.Attrs) with ARIA (accessible) and data-* attributes, allowing a single Props type to manage all common HTML element attributes.

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 HTML added in v0.5.0

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

Types

type Props

type Props struct {
	props.Attrs

	Aria aria.Props
	Data data.Props
}

Props wraps props.Attrs and embeds aria.Props and data.Props to provide a single container for general, ARIA, and data-* attributes for any HTML element.

func (Props) AsTemplAttrs

func (p Props) AsTemplAttrs() templ.Attributes

AsTemplAttrs combines all underlying attributes and returns templ.Attributes for use in templ elements.

Jump to

Keyboard shortcuts

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