statgrid

package
v0.5.30 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 5 Imported by: 0

README

statgrid

statgrid is a responsive, presentation-only grid component for displaying key statistics/metrics in key-value pairs (e.g. "80+" / "Años de historia").

Usage

import "github.com/tinywasm/components/statgrid"

grid := &statgrid.StatGrid{
    Items: []statgrid.StatItem{
        {Value: "80+", Label: "Años de historia"},
        {Value: "15,000+", Label: "Pacientes atendidos"},
        {Value: "24/7", Label: "Atención continuada"},
    },
}

Documentation

Index

Constants

View Source
const (
	PartItem  = widget.Part("item")
	PartValue = widget.Part("value")
	PartLabel = widget.Part("label")
)
View Source
const NameStatGrid = widget.Name("statgrid")

NameStatGrid is the widget name for statgrid.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatGrid

type StatGrid struct {
	Element
	Items []StatItem
}

StatGrid displays a responsive grid of key metrics/statistics.

func (*StatGrid) Render

func (s *StatGrid) Render() *Element

func (*StatGrid) RenderCSS

func (s *StatGrid) RenderCSS() *css.Stylesheet

RenderCSS defines the stylesheet for statgrid.

func (*StatGrid) WidgetKind

func (s *StatGrid) WidgetKind() widget.Kind

func (*StatGrid) WidgetName

func (s *StatGrid) WidgetName() widget.Name

type StatItem

type StatItem struct {
	Value string
	Label string
}

StatItem represents a single statistic pair (value and label).

Jump to

Keyboard shortcuts

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