sheet

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SheetFixtures = gx.Fixtures[SheetProps]{
	"Right": {
		Id:          "demo-sheet",
		Title:       "Filters",
		Description: "Narrow the result set.",
		Children:    gx.Text("Sheet body."),
		Trigger:     button.Button(button.ButtonProps{Variant: button.Outline, Children: gx.Text("Open sheet")}),
	},
	"Bottom": {
		Id:      "demo-sheet-bottom",
		Side:    Bottom,
		Title:   "Filters",
		Trigger: button.Button(button.ButtonProps{Variant: button.Outline, Children: gx.Text("Open bottom sheet")}),
	},
}

Functions

func Sheet

func Sheet(p SheetProps) gx.Node

Types

type SheetProps

type SheetProps struct {
	// Id is the id of the dialog element. The trigger opens the sheet by this id.
	Id string
	// Side sets the edge of the screen that the sheet slides from: Right, Left, Top or Bottom.
	Side Side
	// Title is the heading of the sheet. An empty value renders no heading.
	Title string
	// Description is the text below the title. An empty value renders no description.
	Description string
	// Trigger is the element that opens the sheet on a click. A nil value renders no trigger.
	Trigger gx.Node
	// Footer is the content at the bottom of the sheet, usually the action buttons.
	Footer gx.Node
	// Open renders the sheet open on the first render.
	Open bool
	// Class adds classes to the dialog element.
	Class string
	// Children is the content of the sheet.
	Children gx.Node
	// Attrs adds HTML attributes to the dialog element.
	Attrs gx.Attrs
}

type Side

type Side string

Side is the edge a sheet slides from.

const (
	Right  Side = "right"
	Left   Side = "left"
	Top    Side = "top"
	Bottom Side = "bottom"
)

The sides of sheet.Sheet.

Jump to

Keyboard shortcuts

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