Component Detail

EmptyState

No-data and loading empty-state presentation

Example

References

Template
templates/components/empty_state.html
Golden
testdata/golden/empty_state.golden.html

Go (Marionette) Example

This implementation example uses Marionette in Go. Source: docs/site-astro/public/examples/go/empty-state.go

package goexamples

import (
	mb "github.com/YoshihideShirai/marionette/backend"
	mf "github.com/YoshihideShirai/marionette/frontend"
)

func RegisterEmptyStateExample(app *mb.App) {
	app.Page("/empty-state", func(ctx *mb.Context) mf.Node {
		return mf.EmptyState(mf.EmptyStateProps{
			Title:       "No users",
			Description: "Create a user to populate this table.",
			Icon:        "0",
		})
	})
}