fieldset

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package fieldset is the global form-field skin for the tinywasm ecosystem.

It renders nothing itself. It exists so the SSR pipeline collects its RenderCSS(), which styles the structure tinywasm/form emits for every field — a `.tw-field` wrapper containing a `<label>` and the widget's input — as the reference "labeled box" look (a chip legend over a white box).

A consumer opts EVERY form in the app into this look exactly once, by depending on this package from its composition root. The CSS is emitted globally, so all forms in all panels render identically with zero per-field or per-model config. Swapping the whole app's form look = swapping this one dependency.

It deliberately styles form elements (`.tw-field`), which the generic component guideline discourages — that is precisely this package's job: it is the one place the ecosystem centralizes form appearance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fieldset

type Fieldset struct {
	Element
}

Fieldset is the skin's receiver type. The SSR collector instantiates it to call RenderCSS(); it carries no state and paints no markup of its own.

func (*Fieldset) RenderCSS

func (f *Fieldset) RenderCSS() *Stylesheet

RenderCSS is the form-field skin. It targets the structure tinywasm/form emits (the `.tw-field` wrapper, its `<label>`, and the input widget) so every form in the app renders as a labeled box: a chip legend over a white, bordered field. Ported from Dev/Pkg/UI/Components/fieldset. Consumes theme tokens only — the app's RootCSS owns their values.

Jump to

Keyboard shortcuts

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