rightpanel

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 4 Imported by: 0

README

RightPanel Layout

Distribution

RightPanel implements a grid-based distribution inspired by the pa100t shell:

  1. Title Row: Top horizontal band.
  2. Content Area: A grid containing the Main Article (left) and Aside Panel (right).

Styling

Uses semantic tokens from github.com/tinywasm/css for all colors and spacing. Proportions are controlled via --rp-main-width and --rp-aside-width.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RightPanel

type RightPanel struct {
	Element

	// Module provides the ID for the root wrapper element.
	Module layout.Module

	// Title is rendered as <h1> in the header.
	Title string

	// Head is rendered beside the <h1> (e.g. status badge, icon).
	Head Component

	// HeadControls is rendered below the title row (e.g. select with search).
	HeadControls Component

	// Article is the main content area.
	Article Component

	// AsideControls is rendered at the top of the aside panel (e.g. search + filter).
	AsideControls Component

	// Aside is the content area of the aside panel (e.g. detail view, info card).
	Aside Component
}

RightPanel is a two-column layout skeleton:

  • Left: main content area with header (title + controls) and article.
  • Right: aside panel with its own header (controls) and content.

All slots are optional. A nil slot is simply not rendered. The layout does not define what the slots contain — that is the consumer's job.

IMPORTANT: All Component implementors passed as slots MUST embed Element as a value, not as a pointer. See tinywasm/dom interface.dom.go for details.

Usage:

panel := &rightpanel.RightPanel{
    Module:        myModel,          // implements ModelName() string
    Title:         "Users",
    HeadControls:  mySelectSearch,
    Article:       myTable,
    AsideControls: myFilterBar,
    Aside:         myDetailPanel,
}
panel.Render()

func (*RightPanel) Render

func (r *RightPanel) Render() *Element

Render builds the layout element tree. Implements ViewRenderer.

func (*RightPanel) RenderCSS

func (r *RightPanel) RenderCSS() *Stylesheet

RenderCSS implements CSSProvider.

Jump to

Keyboard shortcuts

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