offset

package
v0.1.98 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Offset

func Offset(x, y unit.Dp) ui.Modifier

Offset creates a modifier that translates the element by the given X and Y offset. This is useful for creating overlapping layouts like profile cards with avatars.

func OffsetX

func OffsetX(x unit.Dp) ui.Modifier

OffsetX creates a modifier that translates only horizontally.

func OffsetY

func OffsetY(y unit.Dp) ui.Modifier

OffsetY creates a modifier that translates only vertically. Negative values move the element up, positive values move it down.

Types

type ChainNode

type ChainNode = node.ChainNode

type Modifier

type Modifier = modifier.Modifier

type OffsetData

type OffsetData struct {
	X unit.Dp
	Y unit.Dp
}

OffsetData holds the X and Y offset values

type OffsetElement

type OffsetElement struct {
	// contains filtered or unexported fields
}

func (*OffsetElement) Create

func (e *OffsetElement) Create() node.Node

func (*OffsetElement) Equals

func (e *OffsetElement) Equals(other modifier.Element) bool

func (*OffsetElement) Update

func (e *OffsetElement) Update(n node.Node)

type OffsetNode

type OffsetNode struct {
	node.ChainNode
	// contains filtered or unexported fields
}

func NewOffsetNode

func NewOffsetNode(data OffsetData) *OffsetNode

type TreeNode

type TreeNode = node.TreeNode

Jump to

Keyboard shortcuts

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