base

package module
v0.0.0-...-c353a36 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 0 Imported by: 0

README

Go Reference MIT License

Base (github.com/fastygo/base)

Semantic headless templ primitives — no ui-* presets and no Tailwind/class opinions in-kit. Caller supplies styling via Class and Attrs only. Styled molecules (Variant, ui-*, ui8px policy) belong in github.com/fastygo/ui8kit; product compositions live in apps (internal/ui/..., fastygo add roadmap).

Imports are one package per atom so go mod vendor trims to what your graph uses.

Semver tagged releases track doc.go's Version (mirrors annotated tags). Pre-1.0 policy: MINOR may add atoms or props (docs/versioning.md).

Install

go get github.com/fastygo/base@v0.1.0

Minimal example

package main

import (
  "context"
  "os"

  "github.com/fastygo/base/button"
)

func main() {
  _ = button.Button(button.ButtonProps{Class: "my-trigger"}, "OK").Render(context.Background(), os.Stdout)
}

Generate templ output after editing .templ files:

go generate ./...

Packages

See docs/packages.md for links and notes.

Tooling & CI

bash ./scripts/preflight.sh           # templ generate via go generate, vet, build, test
PREFLIGHT_RUN_RACE=1 bash ./scripts/preflight.sh
bash ./scripts/release.sh <semver>    # bumps doc.go Version + tag vX.Y.Z

Docs

Doc Topic
design-principles.md Headless contract
packages.md Atom catalogue
versioning.md Releases & semver
integration.md Layering Base → UI8Kit → app

License

MIT — see LICENSE.

Documentation

Overview

Package base is the root module identity for github.com/fastygo/base.

This module provides per-atom subpackages — import them directly instead of importing base:

import "github.com/fastygo/base/button"

Base is semantics-only headless primitives: slots for Class / Attrs, no presets. Styled molecules live in github.com/fastygo/ui8kit.

Prefer github.com/fastygo/ui8kit when you need Variant, ui-* classes on top of primitives.

Packages

See docs/packages.md(/docs/packages.md) or [README](README.md) for the atom list.

Compatibility

Pre-1.0: APIs are semver-advertised with tags (vX.Y.Z) but MINOR may add atoms or props; deprecations noted in changelog.

Index

Constants

View Source
const Version = "0.1.0"

Version matches annotated git tags (v0.M.P). Updated by scripts/release.sh via scripts/cmd/set-version.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
Package field binds labels, hints, native controls, Switch role on checkbox primitive.
Package field binds labels, hints, native controls, Switch role on checkbox primitive.
Package fieldset is a native grouping control with Caller Class slot.
Package fieldset is a native grouping control with Caller Class slot.
Package figure wraps Figure primitives with captions.
Package figure wraps Figure primitives with captions.
Package form binds <form action/method/target> primitives with Caller Class.
Package form binds <form action/method/target> primitives with Caller Class.
Package grid lays out responsive CSS grid slots using data-* hints with no presets.
Package grid lays out responsive CSS grid slots using data-* hints with no presets.
Package group is a horizontal/grouping layout primitive using data-grow hooks without presets.
Package group is a horizontal/grouping layout primitive using data-grow hooks without presets.
Package icon carries icon Name via data-icon + Caller Class hooks.
Package icon carries icon Name via data-icon + Caller Class hooks.
Package image emits native Img with Caller Class + Loading hint.
Package image emits native Img with Caller Class + Loading hint.
internal
templ: version: v0.3.1001
templ: version: v0.3.1001
Package legend labels a Fieldset grouping.
Package legend labels a Fieldset grouping.
Package list emits native list structures (Ul/Ol/Dl/Menu semantics).
Package list emits native list structures (Ul/Ol/Dl/Menu semantics).
Package meter renders native Meter metrics with Caller Class hook.
Package meter renders native Meter metrics with Caller Class hook.
Package optgroup is a native OptGroup grouping inside Select primitives.
Package optgroup is a native OptGroup grouping inside Select primitives.
Package output renders native <output> with For/Value linking.
Package output renders native <output> with For/Value linking.
Package picture wraps Picture layout without presets.
Package picture wraps Picture layout without presets.
Package progress binds native Progress controls with Caller Class hooks.
Package progress binds native Progress controls with Caller Class hooks.
scripts
cmd/set-version command
Package source emits native Picture Source attributes (srcset/media/type/sizes/src).
Package source emits native Picture Source attributes (srcset/media/type/sizes/src).
Package stack lays out vertical flow with an allowed polymorphic container tag (div default).
Package stack lays out vertical flow with an allowed polymorphic container tag (div default).
Package table emits native table trees with Caller Class hooks on each semantic node.
Package table emits native table trees with Caller Class hooks on each semantic node.
Package text renders block or inline prose tags with Class only — no typography presets.
Package text renders block or inline prose tags with Class only — no typography presets.
Package title exposes heading primitives with order + Class only.
Package title exposes heading primitives with order + Class only.
Package utils exposes class composition helpers, ARIA templ attributes, and allowed HTML tag guards.
Package utils exposes class composition helpers, ARIA templ attributes, and allowed HTML tag guards.

Jump to

Keyboard shortcuts

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