card

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 2 Imported by: 0

README

Card Component

Container with header, body, and footer sections.

Import

"github.com/tinywasm/components/card"

Usage

c := &card.Card{
    Header: dom.Tag("h3").Text("Card Title").ToComponent(),
    Body:   dom.Tag("p").Text("Content goes here...").ToComponent(),
    Footer: dom.Tag("small").Text("Last updated: today").ToComponent(),
}

Properties

  • Header (dom.Component): Content for header section.
  • Body (dom.Component): Main content.
  • Footer (dom.Component): Footer content.

Back to Catalog

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	*dom.Element
	Header dom.Component
	Body   dom.Component
	Footer dom.Component
}

func (*Card) IconSvg added in v0.0.5

func (c *Card) IconSvg() map[string]string

func (*Card) Render added in v0.0.5

func (c *Card) Render() *dom.Element

func (*Card) RenderCSS

func (c *Card) RenderCSS() string

Jump to

Keyboard shortcuts

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