components

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package components holds the complete example on each component's guide page, compiled here so that they can't go stale.

Index

Constants

This section is empty.

Variables

View Source
var Screens = map[string]ui.Component{
	"button":            Checkout{},
	"icon-button":       Toolbar{},
	"floating-button":   Orders{},
	"checkbox":          Extras{},
	"radio-group":       Payment{},
	"segmented-control": Sales{},
	"stepper":           Basket{},
	"select":            Branch{},
	"date-field":        Reservation{},
	"search-bar":        Menu{},
	"otp-input":         Verify{},
	"icon":              Icons{},
	"image":             Photo{},
	"avatar":            Team{},
	"badge":             OrderStates{},
	"chip":              Filters{},
	"divider":           Receipt{},
	"list-row":          Settings{},
	"progress-bar":      Upload{},
	"skeleton":          Loading{},
	"empty-state":       NoOrders{},
	"sheet":             FlatWhite{},
	"action-sheet":      OrderActions{},
	"toast":             Placed{},
	"banner":            Offline{},
	"menu":              RowMenu{},
	"tooltip":           ServiceCharge{},
	"app-bar":           Details{},
	"grid":              Categories{},
	"accordion":         FAQ{},
	"carousel":          Offers{},
	"swipe-row":         Inbox{},
	"gestures":          Tile{},
	"canvas":            Bakery{},
}

Screens are the examples, by page.

Functions

This section is empty.

Types

type Bakery

type Bakery struct{}

Bakery draws a day at the bakery on one canvas: a ring that fills to the day's goal (tap it to fill it again), a spinner, a card with a shadow, a photo and wrapped text, a heart that beats, colors that blend, a slider that snaps, and a banner a shader paints. The phone runs the animations and the shader, and follows the finger.

func (Bakery) Render

func (Bakery) Render(c *ui.Ctx) ui.Component

type Basket

type Basket struct{}

Basket changes a quantity, and the price follows.

func (Basket) Render

func (Basket) Render(c *ui.Ctx) ui.Component

type Branch

type Branch struct{}

Branch opens the platform's own list of choices.

func (Branch) Render

func (Branch) Render(c *ui.Ctx) ui.Component

type Categories

type Categories struct{}

Categories lays its tiles out in equal columns.

func (Categories) Render

func (Categories) Render(c *ui.Ctx) ui.Component

type Checkout

type Checkout struct{}

Checkout places an order, with a spinner while it works.

func (Checkout) Render

func (Checkout) Render(c *ui.Ctx) ui.Component

type Details

type Details struct{}

Details has a top bar without a navigation stack.

func (Details) Render

func (Details) Render(c *ui.Ctx) ui.Component

type Extras

type Extras struct{}

Extras are choices that stack up.

func (Extras) Render

func (Extras) Render(c *ui.Ctx) ui.Component

type FAQ

type FAQ struct{}

FAQ opens one answer at a time.

func (FAQ) Render

func (FAQ) Render(c *ui.Ctx) ui.Component

type Filters

type Filters struct{}

Filters toggles a choice, and a tag can be removed.

func (Filters) Render

func (Filters) Render(c *ui.Ctx) ui.Component

type FlatWhite

type FlatWhite struct{}

FlatWhite opens a panel with its own component inside.

func (FlatWhite) Render

func (FlatWhite) Render(c *ui.Ctx) ui.Component

type Icons

type Icons struct{}

Icons shows the built-in set, in the theme's colors.

func (Icons) Render

func (Icons) Render(c *ui.Ctx) ui.Component

type Inbox

type Inbox struct{}

Inbox reveals an action when a row is swiped left.

func (Inbox) Render

func (Inbox) Render(c *ui.Ctx) ui.Component

type Loading

type Loading struct{}

Loading holds the shape of a row until its data arrives.

func (Loading) Render

func (Loading) Render(c *ui.Ctx) ui.Component
type Menu struct{}

Menu filters as they type.

func (Menu) Render(c *ui.Ctx) ui.Component

type NoOrders

type NoOrders struct{}

NoOrders says what to do when there's nothing yet.

func (NoOrders) Render

func (NoOrders) Render(c *ui.Ctx) ui.Component

type Offers

type Offers struct{}

Offers shows one page at a time.

func (Offers) Render

func (Offers) Render(c *ui.Ctx) ui.Component

type Offline

type Offline struct{}

Offline stays in the page until it's dealt with.

func (Offline) Render

func (Offline) Render(c *ui.Ctx) ui.Component

type OrderActions

type OrderActions struct{}

OrderActions asks what to do next.

func (OrderActions) Render

func (OrderActions) Render(c *ui.Ctx) ui.Component

type OrderStates

type OrderStates struct{}

OrderStates labels what state each order is in.

func (OrderStates) Render

func (OrderStates) Render(c *ui.Ctx) ui.Component

type Orders

type Orders struct{}

Orders has one main action, floating over the list.

func (Orders) Render

func (Orders) Render(c *ui.Ctx) ui.Component

type Payment

type Payment struct{}

Payment picks one way to pay, with every option in view.

func (Payment) Render

func (Payment) Render(c *ui.Ctx) ui.Component

type Photo

type Photo struct{}

Photo shows a picture filling its frame, and one fitted inside it.

func (Photo) Render

func (Photo) Render(c *ui.Ctx) ui.Component

type Placed

type Placed struct{}

Placed confirms something without stopping them.

func (Placed) Render

func (Placed) Render(c *ui.Ctx) ui.Component

type Receipt

type Receipt struct{}

Receipt separates its lines.

func (Receipt) Render

func (Receipt) Render(c *ui.Ctx) ui.Component

type Reservation

type Reservation struct{}

Reservation takes a date and a time with the platform's pickers.

func (Reservation) Render

func (Reservation) Render(c *ui.Ctx) ui.Component

type RowMenu

type RowMenu struct{}

RowMenu opens its actions beside the dots.

func (RowMenu) Render

func (RowMenu) Render(c *ui.Ctx) ui.Component

type Sales

type Sales struct{}

Sales switches between views of the same figures.

func (Sales) Render

func (Sales) Render(c *ui.Ctx) ui.Component

type ServiceCharge

type ServiceCharge struct{}

ServiceCharge explains a term when it's tapped.

func (ServiceCharge) Render

func (ServiceCharge) Render(c *ui.Ctx) ui.Component

type Settings

type Settings struct{}

Settings is the usual kinds of row.

func (Settings) Render

func (Settings) Render(c *ui.Ctx) ui.Component

type Team

type Team struct{}

Team shows a picture when there is one, and initials when not.

func (Team) Render

func (Team) Render(c *ui.Ctx) ui.Component

type Tile

type Tile struct{}

Tile follows a finger, and says which way it was flicked.

func (Tile) Render

func (Tile) Render(c *ui.Ctx) ui.Component

type Toolbar

type Toolbar struct{}

Toolbar is a row of actions that are only icons.

func (Toolbar) Render

func (Toolbar) Render(c *ui.Ctx) ui.Component

type Upload

type Upload struct{}

Upload shows how far it has got, or just that it's busy.

func (Upload) Render

func (Upload) Render(c *ui.Ctx) ui.Component

type Verify

type Verify struct{}

Verify checks the code as soon as it's complete.

func (Verify) Render

func (Verify) Render(c *ui.Ctx) ui.Component

Jump to

Keyboard shortcuts

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