Skip to main content

Widget catalog

frus ships one widget library, frus-widgets. Its defaults come from the theme, and an application can override every one of them. This catalog has 175 pages as of e6fba33f5b42, one for each demo of frus's widget gallery, in twelve families.

Every page is written from the widget's own source and from the gallery's demo, at the revision its source line names. The gallery also runs in the browser, at https://frus-rs.github.io/frus/, if yours has WebGPU.

The families​

FamilyPagesWhat is in it
Layout23Boxes, rows, columns, stacks and constraints
Text7Text, styles, rich and selectable text
Buttons & menus11Buttons, icon buttons, toggles and menus
Inputs & forms20Text fields, choices, sliders, pickers and validation
Display15Cards, chips, avatars, icons, images, tables and charts
Feedback12Dialogs, snack bars, sheets, banners and progress
Navigation15App bars, tabs, navigation bars, rails and drawers
Lists & scrolling16Lists, grids, pages, reordering and expansion
Animation16Implicit animations, transitions and heroes
Painting & effects11Decoration, clipping, transforms, custom painting and filters
Interaction14Gestures, hover, drag and drop, focus and shortcuts
State & async15Hooks, notifiers, futures, streams, theme and screen size

How to read a widget page​

PartWhat it is
PurposeOne sentence: what the widget is for.
SignatureThe type and its constructors as they are spelled in the source, copied verbatim.
ExampleThe demo rendered, and the gallery's file that builds it. The gallery compiles that file, so it is never out of date.
PropertiesThe builder methods: each one's arguments as written, and what it changes.
BehaviourThe type's own documentation: layout, events, what screen readers are told, platform differences.
See alsoThe family's neighbouring widgets, the guide's page, and the API reference.
SourceA permalink to the file the page was written from, at the pinned revision.
  • Every style can be overridden. A widget takes its colours, type and shape from the theme, never from a constant. Restyle one instance with its builder methods, or every widget of a kind through the theme.
  • Interactive widgets are controlled. A checkbox, a slider or a text field shows the value you give it, and tells you when the user changes it. The state stays yours.