bloom

Examples

Runnable example programs in the bloom repository, what each one shows, and how to run them.

The repository's _examples directory has complete programs, in rough order of complexity. To run one, clone the repository and run it from that directory:

git clone https://github.com/lrstanley/bloom
cd bloom/_examples
go run ./forms
ExampleShowsRelated pages
basicsLayouts printed with Render, without a program: every slot, Min and Max, Collapsible, gaps, Justify, Align, Space, Box, wrapping text, Centered, and a layout inside Lip GlossSizing with slots, Text, boxes, and alignment
standardThe usual shape of a program: a sidebar that's a Layouter, a plain component as the reader, a Measurer status bar, and clicksBuild your first layout
responsivePanels collapsing by priority, Percent, a toolbar that rebuilds for its width, wrapping tags, paging with Solve in Update, and wheel scrollingResponsive layouts, Scrolling
mouseMouse handlers with no IDs: hover styles, click and double click, wheel scrolling, a divider that keeps its drag, and ThrottleMouseMouse events
formsFocusable inputs with the cursor, an anchored autocomplete dropdown, stacked modal dialogs as focus scopes, recolored backdrops, shadows, a spring entrance, and a toastDialogs and modals, Focus, Dropdowns
effectsEvery effect as a looping transition, two custom effects, a Drawable, and each backdropEffects reference, Custom effects
transitionsUnfold, Iris, Shade, Blinds, Wave, the Stagger, Delay, Reverse, and Ease combinators, and dialogs opening from their buttonTransitions
launchA deploy console: shimmering placeholders, rolling numbers, a shake on wrong input, a spotlight tour with Decode, confetti, and a glitching badgeFeedback effects
tickerMarquee headlines and list items, and anim.Sequence for a banner and a pulseFeedback effects, Animating values
reflowLayout animation with Animate: a sidebar, a re-sorting list, a changing split, a panel coming and going, and a layer following the selectionLayout animation
dashboardEverything together at 120 frames a second, with the time each frame takesRendering and performance
showcaseA bit of everything, themed with bubbletint: tints that wave in with a decoding toast, panes that float under the pointer as they're dragged by their titles, and zoom with a double click, collapsing panes, and a spotlight tourRelated libraries, Layout animation, Mouse events

Each example's comment at the top of main.go lists its keys. Most quit with q or ctrl+c.

The examples' tests drive each program end to end with steep, and record the animations shown throughout these docs, as animated WebP. Run this from the repository root to record them again, into docs/public/demos. It needs ffmpeg on your PATH:

make demos

To record them somewhere else, set STEEP_EXPORT_DIR:

STEEP_EXPORT_DIR=/tmp/demos make demos

Last updated on