fragments

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

The fragments example: one fragment declaration serves both render modes. Pages compose it inline via @ItemRow(...); the row's refresh link binds a typed route constructor whose handler renders only the fragment via ItemRowFragment(...).RenderFragment — no page around it (FR-031, FR-034).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ItemRow

func ItemRow(id string, name string) ghtmx.Component

ItemRow renders the fragment inline as a component.

func ItemRowFragment

func ItemRowFragment(id string, name string) ghtmx.Fragment

ItemRowFragment renders only the fragment, for an htmx swap (FR-031).

func Routes

func Routes() *http.ServeMux

Routes builds the example's router; the official docs site mounts it as a live demo.

Types

type Item

type Item struct {
	ID   string
	Name string
}

Item is a row of the demo table.

Directories

Path Synopsis
Command fragments serves the fragments example standalone.
Command fragments serves the fragments example standalone.

Jump to

Keyboard shortcuts

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