dir

package
v0.2.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LeftToRight Left-to-right text direction. Default for most languages including English, Spanish,
	// French, and other Latin-based scripts. Text flows from left edge to right.
	LeftToRight = Dir("ltr")

	// RightToLeft Right-to-left text direction. Required for languages like Arabic, Hebrew, Persian,
	// and Urdu. Text flows from right edge to left with appropriate alignment.
	RightToLeft = Dir("rtl")

	// Auto Automatic direction detection based on text content. Browser analyzes text to
	// determine appropriate direction, useful for mixed-language content.
	Auto = Dir("auto")
)

Variables for Dir values

Functions

This section is empty.

Types

type Dir

type Dir []byte

Dir Text directionality for element content. Controls reading order and text alignment for different languages and writing systems, essential for internationalization.

func Custom

func Custom(value string) Dir

Custom allows setting a custom Dir 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