Skip to content

Empty State

Explain why content is absent and give the user a useful next action.

Default Rendered example

No incidents found

Adjust the filters or create the first incident.

Usage Example
@emptystate.EmptyState(emptystate.Config{
    Title:       "No incidents found",
    Description: "Adjust the filters or create the first incident.",
    Icon:        incidentIcon(),
    Action:      createIncidentAction(),
})

Built-in text: the development API provides expressions.EmptyState for application defaults, request preferences, and individual component overrides. Read the expression guide.

Informational

Omit Action when the user only needs to understand when content will appear.

Informational Rendered example

No recent activity

Deployments and configuration changes will appear here.

Informational
@emptystate.EmptyState(emptystate.Config{
    Title:       "No recent activity",
    Description: "Deployments and configuration changes will appear here.",
})

Go API

v0.4.0

The examples above cover behavior and composition. pkg.go.dev is the canonical reference for exported types, functions, methods, and Go documentation.

github.com/araihu/goshtoso/components/emptystate
Open v0.4.0 API