guide

package
v0.0.14 Latest Latest
Warning

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

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

Documentation

Overview

Package guide holds the complete example on each plugin's guide page, compiled here so that they can't go stale. tools/docref copies each file into its page, as package main.

Index

Constants

This section is empty.

Variables

View Source
var Screens = map[string]ui.Component{
	"appinfo": AboutApp{}, "appreview": RateUs{}, "appstate": LiveOrders{}, "audio": AskOnce{},
	"backgroundtasks": NightlySync{}, "badge": Unread{}, "barcode": ScanCode{}, "biometrics": Figures{},
	"bluetooth": Nearby{}, "browser": OurStory{}, "calendar": Booking{}, "camera": Review{},
	"clipboard": GiftCode{}, "contacts": SendGift{}, "device": AboutPhone{}, "dialog": CancelOrder{},
	"filepicker": Upload{}, "filesystem": Notes{}, "geofencing": Arrivals{}, "geolocation": WhereAmI{},
	"googlemaps": Delivery{}, "haptics": Feedback{}, "keepawake": Till{}, "keyboard": Note{},
	"linking": CallUs{}, "localnotifications": Remind{}, "motion": Level{}, "network": Online{},
	"nfc": ReadTag{}, "orientation": KitchenScreen{}, "purchases": Membership{}, "push": Notifications{},
	"screenreader": OrderReady{}, "securestore": Session{}, "share": SplitBill{}, "signin": Welcome{},
	"speech": ReadAloud{}, "speechrecognition": VoiceSearch{}, "splashscreen": FirstScreen{}, "statusbar": DarkHero{},
	"barometer": Floors{}, "lightsensor": Ambient{}, "magnetometer": Detector{}, "pedometer": Steps{},
	"brightness": BoardingPass{}, "navigationbar": Kiosk{}, "screencapture": CardNumber{},
	"intentlauncher": FixWifi{}, "mailcomposer": SendReceipt{}, "printing": PrintReceipt{}, "sms": TextFriend{},
	"cellular": PhoneNetwork{}, "imagemanipulator": Thumbnail{}, "localization": Prices{}, "medialibrary": SaveToPhotos{},
	"cameraview":  Viewfinder{},
	"audioplayer": Podcast{}, "audiorecorder": VoiceMemo{},
	"calendarevents":     Agenda{},
	"backgroundlocation": Trip{},
	"oauth":              WorkAccount{},
	"applemaps":          Directions{},
	"receiveshare":       Inbox{},
	"sqlite":             Orders{},
	"symbols":            MenuIcons{},
	"scene":              Showroom{},
	"meshgradient":       Sunset{},
	"livephoto":          Moment{},
	"hinge":              Recipe{},
	"splitview":          OrdersSplit{},
	"storage":            Counter{}, "trackingconsent": Consent{}, "video": Tour{}, "webview": Reservations{},
}

Screens are the examples, by plugin.

Functions

This section is empty.

Types

type AboutApp

type AboutApp struct{}

AboutApp shows the version people quote when they ask for help.

func (AboutApp) Render

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

type AboutPhone

type AboutPhone struct{}

AboutPhone is what you'd attach to a support ticket.

func (AboutPhone) Render

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

type Agenda

type Agenda struct{}

Agenda books a table, and shows the week ahead.

func (Agenda) Render

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

type Ambient

type Ambient struct{}

Ambient says how bright the room is. iOS has no such reading, so it gets a line of its own.

func (Ambient) Render

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

type Arrivals

type Arrivals struct{}

Arrivals notices when they reach the cafe.

func (Arrivals) Render

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

type AskOnce

type AskOnce struct{}

AskOnce listens for one spoken turn and plays it back. A real app sends the WAV to its server and plays the answer instead.

func (AskOnce) Render

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

type BoardingPass

type BoardingPass struct{}

BoardingPass turns the screen up while its code is showing, so a scanner can read it, and puts it back on leaving.

func (BoardingPass) Render

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

type Booking

type Booking struct{}

Booking adds a table to their calendar, on the system's screen.

func (Booking) Render

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

type CallUs

type CallUs struct{}

CallUs opens the phone's dialer, or says it can't.

func (CallUs) Render

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

type CancelOrder

type CancelOrder struct{}

CancelOrder asks first, and confirms with a toast.

func (CancelOrder) Render

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

type CardNumber

type CardNumber struct{}

CardNumber is protected while it's showing, and counts any screenshots.

func (CardNumber) Render

func (CardNumber) Render(c *ui.Ctx) ui.Component
type Consent struct{}

Consent explains first, then asks.

func (Consent) Render

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

type Counter

type Counter struct{}

Counter remembers a number between launches.

func (Counter) Render

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

type DarkHero

type DarkHero struct{}

DarkHero sets light icons over a dark screen, and hands back on leaving.

func (DarkHero) Render

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

type Delivery

type Delivery struct{}

Delivery shows the cafe, and says which pin was tapped.

func (Delivery) Render

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

type Detector

type Detector struct{}

Detector shows when something magnetic is close.

func (Detector) Render

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

type Directions

type Directions struct{}

Directions shows the cafe on Apple Maps, and a list of the way on Android, where there's no Apple Maps.

func (Directions) Render

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

type Feedback

type Feedback struct{}

Feedback plays each kind. Haptics return at once, so handlers call them directly.

func (Feedback) Render

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

type Figures

type Figures struct{}

Figures unlocks today's numbers for the manager.

func (Figures) Render

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

type FirstScreen

type FirstScreen struct{}

FirstScreen keeps the launch color up until its data is here.

func (FirstScreen) Render

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

type FixWifi

type FixWifi struct{}

FixWifi opens the phone's Wi-Fi settings, and carries on when they return.

func (FixWifi) Render

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

type Floors

type Floors struct{}

Floors shows the pressure, and how many floors they've climbed.

func (Floors) Render

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

type GiftCode

type GiftCode struct{}

GiftCode copies a code, and pastes one back.

func (GiftCode) Render

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

type Inbox

type Inbox struct{}

Inbox lists what people shared to the app from elsewhere: a link to read later, a photo of a receipt.

func (Inbox) Render

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

type Kiosk

type Kiosk struct{}

Kiosk matches the bar to a dark screen, and hides it on request.

func (Kiosk) Render

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

type KitchenScreen

type KitchenScreen struct{}

KitchenScreen holds the screen sideways while it's showing.

func (KitchenScreen) Render

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

type Level

type Level struct{}

Level shows the tilt on each axis, live.

func (Level) Render

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

type LiveOrders

type LiveOrders struct{}

LiveOrders counts how often the app comes back, the moment to refresh anything that may have gone stale.

func (LiveOrders) Render

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

type Membership

type Membership struct{}

Membership sells one subscription, and hands the receipt to Cashier.

func (Membership) Render

func (Membership) Render(c *ui.Ctx) ui.Component
type MenuIcons struct{}

MenuIcons labels the menu with each platform's own icons.

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

type Moment

type Moment struct{}

Moment lets someone share a Live Photo of their latte art, and plays it back.

func (Moment) Render

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

type Nearby

type Nearby struct{}

Nearby lists what's around for ten seconds.

func (Nearby) Render

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

type NightlySync

type NightlySync struct{}

NightlySync asks for the task, and shows when it last ran.

func (NightlySync) Render

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

type Note

type Note struct{}

Note puts the keyboard away when they're done.

func (Note) Render

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

type Notes

type Notes struct{}

Notes saves a file on each tap and lists what's there.

func (Notes) Render

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

type Notifications

type Notifications struct{}

Notifications asks, gets a token for your server, and shows what arrives.

func (Notifications) Render

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

type Online

type Online struct{}

Online shows a banner while the phone has no connection.

func (Online) Render

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

type OrderReady

type OrderReady struct{}

OrderReady says out loud what changed by itself.

func (OrderReady) Render

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

type Orders

type Orders struct{}

Orders keeps a list of orders in SQLite, and adds one on each tap.

func (Orders) Render

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

type OrdersSplit

type OrdersSplit struct{}

OrdersSplit lists orders beside the open one on a tablet, and pushes the open one on a phone.

func (OrdersSplit) Render

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

type OurStory

type OurStory struct{}

OurStory opens a page inside the app.

func (OurStory) Render

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

type PhoneNetwork

type PhoneNetwork struct{}

PhoneNetwork shows what the phone will say about its network.

func (PhoneNetwork) Render

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

type Podcast

type Podcast struct{}

Podcast plays a show, with a bar that follows it.

func (Podcast) Render

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

type Prices

type Prices struct{}

Prices shows a price and a distance the way they're used to.

func (Prices) Render

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

type PrintReceipt

type PrintReceipt struct{}

PrintReceipt prints a page written in HTML.

func (PrintReceipt) Render

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

type RateUs

type RateUs struct{}

RateUs asks for a rating after something went well. The system decides whether the prompt really shows, so nothing here depends on it.

func (RateUs) Render

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

type ReadAloud

type ReadAloud struct{}

ReadAloud reads a recipe step, hands free.

func (ReadAloud) Render

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

type ReadTag

type ReadTag struct{}

ReadTag collects a loyalty stamp from a tag on the counter.

func (ReadTag) Render

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

type Recipe

type Recipe struct{}

Recipe goes tabletop on a half-open foldable: the video above the fold, the steps below it.

func (Recipe) Render

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

type Remind

type Remind struct{}

Remind sets a reminder for ten seconds from now.

func (Remind) Render

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

type Reservations

type Reservations struct{}

Reservations puts a booking page under a header of your own.

func (Reservations) Render

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

type Review

type Review struct{}

Review takes a photo or picks one, ready to upload.

func (Review) Render

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

type SaveToPhotos

type SaveToPhotos struct{}

SaveToPhotos saves a picture, then reads back the newest one.

func (SaveToPhotos) Render

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

type ScanCode

type ScanCode struct{}

ScanCode reads the code on a table.

func (ScanCode) Render

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

type SendGift

type SendGift struct{}

SendGift lets them choose one person. The system's picker needs no permission: the app only sees who they chose.

func (SendGift) Render

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

type SendReceipt

type SendReceipt struct{}

SendReceipt fills in an email with a receipt attached.

func (SendReceipt) Render

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

type Session

type Session struct{}

Session keeps a sign-in token in the Keychain or Keystore.

func (Session) Render

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

type Showroom

type Showroom struct{}

Showroom shows a gift box on a table, in shadow, to turn with a finger. For a model from Blender or a store, scene.LoadGLTF reads its .glb.

func (Showroom) Render

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

type SplitBill

type SplitBill struct{}

SplitBill sends a message, and a receipt as a file.

func (SplitBill) Render

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

type Steps

type Steps struct{}

Steps counts a walk, from the moment they tap.

func (Steps) Render

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

type Sunset

type Sunset struct{}

Sunset is a welcome screen on a mesh gradient, its middle point bent toward the top right.

func (Sunset) Render

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

type TextFriend

type TextFriend struct{}

TextFriend fills in a text for them to check and send.

func (TextFriend) Render

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

type Thumbnail

type Thumbnail struct{}

Thumbnail shrinks and turns a picture, and shows what it cost. A real app starts from camera.Pick and imagemanipulator.Decode.

func (Thumbnail) Render

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

type Till

type Till struct{}

Till keeps the screen on for as long as it's showing.

func (Till) Render

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

type Tour

type Tour struct{}

Tour plays a clip, with a button of your own.

func (Tour) Render

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

type Trip

type Trip struct{}

Trip follows a delivery, even with the app in the background.

func (Trip) Render

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

type Unread

type Unread struct{}

Unread keeps the number on the app's icon.

func (Unread) Render

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

type Upload

type Upload struct{}

Upload takes a PDF.

func (Upload) Render

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

type Viewfinder

type Viewfinder struct{}

Viewfinder shows the camera with buttons of its own over it.

func (Viewfinder) Render

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

type VoiceMemo

type VoiceMemo struct{}

VoiceMemo records a note, shows the level, and plays it back.

func (VoiceMemo) Render

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

type VoiceSearch

type VoiceSearch struct{}

VoiceSearch writes out what they say, for up to ten seconds.

func (VoiceSearch) Render

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

type Welcome

type Welcome struct{}

Welcome offers both. Send u.IDToken to your server, and have it call signin.Verify: what a phone says proves nothing by itself.

func (Welcome) Render

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

type WhereAmI

type WhereAmI struct{}

WhereAmI finds the phone once.

func (WhereAmI) Render

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

type WorkAccount

type WorkAccount struct{}

WorkAccount signs in with Microsoft. Keep the refresh token in securestore, and send the ID token to your server to check, as you would signin's.

func (WorkAccount) Render

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

Directories

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

Jump to

Keyboard shortcuts

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