hidden

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package hidden defines the Hidden type and its predefined values.

Controls element visibility and findability. When set without a value the element is fully hidden from rendering. The until-found keyword hides the element but allows it to be discovered by find-in-page and fragment navigation.

Index

Constants

This section is empty.

Variables

View Source
var (
	// True Element is fully hidden from rendering. The browser will not display the element
	// and it will not participate in layout or be accessible to assistive technologies.
	True = Hidden("true")

	// UntilFound Element is hidden but findable. The browser hides the element from rendering but
	// allows it to be revealed by find-in-page search or fragment URL navigation. When
	// found, the browser fires a beforematch event and removes the hidden attribute.
	UntilFound = Hidden("until-found")
)

Variables for Hidden values

Functions

This section is empty.

Types

type Hidden

type Hidden []byte

Hidden is a typed value for the HTML hidden attribute.

Controls element visibility and findability. When set without a value the element is fully hidden from rendering. The until-found keyword hides the element but allows it to be discovered by find-in-page and fragment navigation.

func Custom

func Custom(value string) Hidden

Custom allows setting a custom Hidden value for edge cases or future specifications. Use this when the predefined constants don't cover your specific use case.

Jump to

Keyboard shortcuts

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