empty

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 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 EmptyContentFixtures = gx.Fixtures[EmptyContentProps]{"Empty": {}}
View Source
var EmptyDescriptionFixtures = gx.Fixtures[EmptyDescriptionProps]{"Text": {Children: gx.Text("Create your first project.")}}
View Source
var EmptyFixtures = gx.Fixtures[EmptyProps]{
	"Full": {Children: gx.Frag(
		EmptyHeader(EmptyHeaderProps{Children: gx.Frag(
			EmptyMedia(EmptyMediaProps{Variant: Icon, Children: icons.Info(icons.InfoProps{})}),
			EmptyTitle(EmptyTitleProps{Children: gx.Text("No projects")}),
			EmptyDescription(EmptyDescriptionProps{Children: gx.Text("Create your first project to start.")}),
		)}),
		EmptyContent(EmptyContentProps{Children: button.Button(button.ButtonProps{Children: gx.Text("New project")})}),
	)},
	"Outline": {Class: "border", Children: EmptyHeader(EmptyHeaderProps{Children: gx.Frag(
		EmptyTitle(EmptyTitleProps{Children: gx.Text("No results")}),
		EmptyDescription(EmptyDescriptionProps{Children: gx.Text("Change the filter and search again.")}),
	)})},
}
View Source
var EmptyHeaderFixtures = gx.Fixtures[EmptyHeaderProps]{"Empty": {}}
View Source
var EmptyMediaFixtures = gx.Fixtures[EmptyMediaProps]{
	"Icon":    {Variant: Icon, Children: icons.Info(icons.InfoProps{})},
	"Default": {Children: icons.Info(icons.InfoProps{Class: "size-8"})},
}
View Source
var EmptyTitleFixtures = gx.Fixtures[EmptyTitleProps]{"Title": {Children: gx.Text("No projects")}}

Functions

func Empty

func Empty(p EmptyProps) gx.Node

func EmptyContent

func EmptyContent(p EmptyContentProps) gx.Node

func EmptyDescription

func EmptyDescription(p EmptyDescriptionProps) gx.Node

func EmptyHeader

func EmptyHeader(p EmptyHeaderProps) gx.Node

func EmptyMedia

func EmptyMedia(p EmptyMediaProps) gx.Node

func EmptyTitle

func EmptyTitle(p EmptyTitleProps) gx.Node

Types

type EmptyContentProps

type EmptyContentProps struct {
	// Class adds classes to the root element.
	Class string
	// Children is the content below the header, for example the actions.
	Children gx.Node
	// Attrs adds HTML attributes to the root element.
	Attrs gx.Attrs
}

type EmptyDescriptionProps

type EmptyDescriptionProps struct {
	// Class adds classes to the root element.
	Class string
	// Children is the description text.
	Children gx.Node
	// Attrs adds HTML attributes to the root element.
	Attrs gx.Attrs
}

type EmptyHeaderProps

type EmptyHeaderProps struct {
	// Class adds classes to the root element.
	Class string
	// Children is the content of the header: the media, the title and the description.
	Children gx.Node
	// Attrs adds HTML attributes to the root element.
	Attrs gx.Attrs
}

type EmptyMediaProps

type EmptyMediaProps struct {
	// Variant sets the look of the media: Default or Icon. Icon draws a muted rounded box.
	Variant Variant
	// Class adds classes to the root element.
	Class string
	// Children is the media, for example an icon.
	Children gx.Node
	// Attrs adds HTML attributes to the root element.
	Attrs gx.Attrs
}

type EmptyProps

type EmptyProps struct {
	// Class adds classes to the root element.
	Class string
	// Children is the content of the empty state.
	Children gx.Node
	// Attrs adds HTML attributes to the root element.
	Attrs gx.Attrs
}

type EmptyTitleProps

type EmptyTitleProps struct {
	// Class adds classes to the root element.
	Class string
	// Children is the title text.
	Children gx.Node
	// Attrs adds HTML attributes to the root element.
	Attrs gx.Attrs
}

type Variant

type Variant string

Variant is the look of the media slot of an empty state.

const (
	Default Variant = "default"
	Icon    Variant = "icon"
)

The variants of empty.EmptyMedia.

Jump to

Keyboard shortcuts

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