Skip to content

API index

Generated by pnpm docs:reference from the committed API reports in packages/*/api/. Do not edit this page; edit apps/docs/src/reference/author-surface.ts.

This is 184 names, which is not the whole public surface. The reports the index is built from describe everything the packages export, several hundred names, most of it machinery an application never types. The list of what belongs here is curated by hand in apps/docs/src/reference/author-surface.ts, seeded from every name the pages and examples on this site actually import. If something you use is missing, that file is the one to add it to.

Two things are checked when the page is generated, so neither the names nor the links can rot: every name has to appear in its package API report, and every link has to resolve to a page here. What each name is for is written by hand, in the same file.

The kind is how the API report declares it, so class and interface are the report speaking rather than an editorial choice.

Starting an app

The two ends of the barrier: what the page calls, and what the worker calls back.

NameKindPackageWhat it is
createAppfunctiongesso-frameworkStarts a render worker against a canvas, from the shell thread.
renderRootfunctiongesso-frameworkMounts a tree inside the render worker. The last line of every worker entry file.
WorkerAppclassgesso-frameworkWhat createApp returns: mount it on an element, dispose it when the page leaves.
WorkerAppOptionsinterfacegesso-frameworkEverything the shell side is configured with: the worker, the renderer, the callbacks.
WorkerHandleinterfacegesso-frameworkA worker a channel can open a port on, so several channels can share one.
ShellRequesttypegesso-frameworkA request the worker sends across the barrier for the shell to carry out.

Components and state

A component runs once. These are the pieces that let it change afterwards.

NameKindPackageWhat it is
createComponentfunctiongesso-frameworkInstantiates a component with its props. What JSX compiles to for a component tag.
ComponentContextinterfacegesso-frameworkThe second argument to a component: injection, lifetime, and the node it is mounted on.
Inputstypegesso-frameworkWraps a props type so every prop arrives as a cell rather than a value.
inputfunctiongesso-frameworkCreates a single input cell, mostly for a test that drives a component by hand.
internalStatefunctiongesso-frameworkState a component owns. Read it, write it, bind it into the tree.
InternalStateclassgesso-frameworkThe type internalState returns: a BehaviorSubject with a current value.
computedfunctiongesso-frameworkA cell that is a function of what it reads. The one derivation to reach for.
selectfunctiongesso-frameworkOne field, or one projection, of a cell, as a cell. Structural by default.
Eachfunctiongesso-frameworkA keyed list: <Each of={rows} by="id">{row => ...}</Each>.
Showfunctiongesso-frameworkOne child while a condition holds, with a stable key and no node of its own.
resourcefunctiongesso-frameworkA keyed request with a status, a value, an error and a retry. A stale answer cannot win.
mutatefunctiongesso-frameworkAn optimistic change to a cell, with a rollback that does not clobber a newer one.
debouncedfunctiongesso-frameworkA cell that follows its source once it has stopped moving.
throttledfunctiongesso-frameworkA cell that follows its source at most once every so often, leading and trailing.
UiChildtypegesso-coreAnything that can be a child: an element, a component, or an Observable of either.
Presencefunctiongesso-frameworkKeeps a child mounted while it plays its exit, then removes it.

Elements

The element factories. In a .tsx file the intrinsics compile to these, so a page rarely names them.

NameKindPackageWhat it is
Boxfunctiongesso-coreA rectangle with properties and children. The <box> intrinsic.
Rowfunctiongesso-coreA box laid out along the x axis. The <row> intrinsic.
Columnfunctiongesso-coreA box laid out along the y axis. The <column> intrinsic.
Textfunctiongesso-coreA run of text, measured and broken into lines. The <text> intrinsic.
Buttonfunctiongesso-coreA box that is focusable and hit-testable by default. The <button> intrinsic.
LazyColumnfunctiongesso-coreA column that builds only the rows inside the window it is asked for.

Modifiers

Behaviour attached to an element rather than written into it.

NameKindPackageWhat it is
UiModifierinterfacegesso-coreA behaviour attached to an element, keyed so it survives a rebind.
defineModifierfunctiongesso-coreDeclares a modifier kind, with the attach and detach it runs.
interactivefunctiongesso-coreHover, press and disabled visual states, plus the cursor that goes with them.
bundlefunctiongesso-coreA set of modifiers named once and attached as one, built at module level.
focusRingfunctiongesso-corePaints a ring while the element holds focus.
autoFocusfunctiongesso-coreTakes focus once, when the element mounts.
draggablefunctiongesso-coreTurns pointer drags on the element into an offset stream.
DragOffsetinterfacegesso-coreWhat draggable reports: the offset from where the drag began.
measureconstgesso-corePushes the laid-out box of the element into a Subject after every layout.
LayoutBoxinterfacegesso-coreThe box measure reports: position and size in coordinates of the layout root.
scrollPositionconstgesso-coreReads and writes the offset of a scroll container without a relayout.
animateLayoutconstgesso-coreAnimates the element from its previous box to its new one after a layout change.
sharedElementconstgesso-coreMatches an element across two trees by name, so it moves rather than swaps.
videoSourceconstgesso-coreBinds a video source to the element and hands back its playback state.
tooltipfunctiongesso-componentsAttaches a tooltip to any element, positioned by the overlay service.

Layout values

The lengths and track sizes a layout property accepts.

NameKindPackageWhat it is
autoconstgesso-coreSize from content. The default for a track and for a box that sets no size.
percentfunctiongesso-coreA length relative to the containing block, as percent(100).
frfunctiongesso-coreA grid track that takes a share of the space left over.
minmaxfunctiongesso-coreA grid track with a floor and a ceiling.
repeatfunctiongesso-coreRepeats a run of track sizes a fixed number of times.
UiAlignmenttypegesso-coreWhat the x, y, selfX and selfY alignment properties accept.
UiFlexWraptypegesso-coreWhat flexWrap accepts: nowrap, wrap, wrap-reverse.
ObjectFittypegesso-coreHow an image or video fills its box: fill, cover, contain, none.

Colour, theme and type

The environment values every element inherits, and the tokens that name them.

NameKindPackageWhat it is
UiThemeinterfacegesso-coreA palette and a type scale, provided once and inherited by everything below.
lightThemeconstgesso-coreThe light theme that ships with the framework.
defaultSpacingconstgesso-coreThe spacing scale a theme carries: eight steps, from none to huge.
withDensityfunctiongesso-coreThe same theme at another density. Scales the spacing scale and nothing else.
withContrastfunctiongesso-coreThe same theme with every foreground raised to a 7:1 ratio against its ground.
defineThemeExtensionfunctiongesso-coreA token group of your own on a theme, typed, with no change to UiTheme.
withThemeExtensionfunctiongesso-coreThe same theme carrying one extension’s tokens.
themeExtensionfunctiongesso-coreReads a token group back off a theme, completing on its names.
darkThemeconstgesso-coreThe dark theme that ships with the framework.
lightColorsconstgesso-coreThe light palette on its own, for a theme that keeps the colours and changes the type.
UiColorsinterfacegesso-coreThe token set a palette has to fill: surface, text, accent, and the rest.
UiColorinterfacegesso-coreA resolved colour: red, green, blue, alpha.
parseColorfunctiongesso-coreParses a CSS colour string into a UiColor.
UiTypographyinterfacegesso-coreThe type scale in a theme: body, heading, caption and their siblings.
UiTextStyleinterfacegesso-coreOne step of the scale: family, size, weight, line height, spacing, alignment.
UiFontWeighttypegesso-coreWhat fontWeight accepts: a number, a numeric string, or a CSS keyword.
UiEnvironmentKeysconstgesso-coreThe keys a scoped environment value can be provided under.
ColorSchemetypegesso-frameworkThe appearance signal the shell reports: light or dark.

Motion

Enter and exit states, springs, and the service that runs them.

NameKindPackageWhat it is
fadeconstgesso-coreAn enter or exit state that animates opacity.
scaleFromfunctiongesso-coreAn enter or exit state that animates scale.
slideUpfunctiongesso-coreAn enter or exit state that animates a vertical offset.
springfunctiongesso-coreA spring transition, by token or by stiffness and damping.
AnimationServiceclassgesso-frameworkRuns the animations on the frame clock, and honours reduced motion.

Services

Injected with ctx.inject. Each one owns a capability the worker cannot reach directly.

NameKindPackageWhat it is
ServiceRegistryclassgesso-frameworkWhat ctx.inject looks in. One instance per app, populated at start.
ShellServiceclassgesso-frameworkWhat the worker knows of the page: viewport size, appearance, and requests it can send.
OverlayServiceclassgesso-frameworkMounts a layer above the app: dialogs, menus, tooltips and toasts.
useOverlayfunctiongesso-componentsThe hook the shipped components use to open and close an overlay.
FocusServiceclassgesso-frameworkOwns focus: where it is, where tab sends it, and which trap holds it.
FindServiceclassgesso-frameworkSearches the text in the tree, because browser find cannot see a canvas.
MediaServiceclassgesso-frameworkAsks the shell to decode an image or open a video, and hands back the result.
RouterServiceclassgesso-frameworkThe current route, and the navigation the app performs on it.

Routing

Typed routes, and the outlet that renders whichever one matched.

NameKindPackageWhat it is
routefunctiongesso-frameworkDeclares one route, with its path parameters typed from the path string.
RouteDefinitioninterfacegesso-frameworkWhat route returns, and what a router is configured with.
tofunctiongesso-frameworkBuilds a target for a route, refusing a missing or misspelt parameter.
RouterOutletclassgesso-frameworkRenders whichever route matched, and swaps the tree when it changes.
OutletPropsinterfacegesso-frameworkWhat an outlet takes, including the transition between routes.
createShellHistoryfunctiongesso-frameworkBinds the router to browser history, on the shell thread.

Channels and the barrier

The typed message path between the shell thread and the render worker.

NameKindPackageWhat it is
channelfunctiongesso-frameworkDeclares a typed channel: a view the worker reads, and commands it sends.
defineChannelfunctiongesso-frameworkThe same token from one object, so the view keys and their initial values are written once.
ViewOftypegesso-frameworkThe view type of a token declared with defineChannel.
providefunctiongesso-frameworkServes a channel from the shell thread, over a port.
ChannelSourceinterfacegesso-frameworkWhat a provider implements: the current view, and a handler per command.
ChannelPortinterfacegesso-frameworkThe message port a channel runs over. A MessagePort satisfies it.
createChannelRegistryfunctiongesso-frameworkCollects several channels behind one port, and reports which one failed.
serveChannelsfunctiongesso-frameworkStarts serving a set of channels from the shell, and returns the teardown.
Patchtypegesso-frameworkOne change to a projected view, as it crosses the barrier.
diffProjectionfunctiongesso-frameworkTurns an old and a new view into the patches between them.
isChannelHostMessagefunctiongesso-frameworkNarrows a message event to something the host sent.
isChannelClientMessagefunctiongesso-frameworkNarrows a message event to something the client sent.

The node graph

What an element becomes once it is mounted. Reached from a test or a devtool, not from a component.

NameKindPackageWhat it is
UiNodeclassgesso-coreA mounted element: its properties, its layout record, and its children.
UiNodeTypeenumgesso-coreWhich kind of element a node is.
resolvePropertyByNamefunctiongesso-coreReads one resolved property off a node, inheritance and defaults applied.
createPaintStatefunctiongesso-coreAllocates the scratch record resolvePaintState fills.
resolvePaintStatefunctiongesso-coreResolves everything the painter needs for one node, into that record.
UiVisualStateenumgesso-coreHover, press, focus, disabled: what interactive sets and paint reads.
UiVisualStateSettypegesso-coreThe set of visual states a node currently holds.

Semantics

The accessibility record a node publishes, and the shapes it is patched with.

NameKindPackageWhat it is
UiSemanticsRecordinterfacegesso-coreWhat one node publishes to the accessibility mirror.
UiSemanticsUpdateinterfacegesso-coreA batch of semantics changes crossing to the shell in one message.
UiSemanticsPatchtypegesso-coreThe change to one record inside that batch.
UiSemanticStatetypegesso-coreWhat the states property accepts: checked, expanded, busy, and the rest.

Input, selection and find

Pointer events, and the text ranges selection and find leave behind on a node.

NameKindPackageWhat it is
UiPointerEventclassgesso-coreA pointer event as it reaches a node, in coordinates local to the node.
UiPointerDeviceinterfacegesso-coreWhat kind of pointer it was, and what it can do.
noKeyModifiersfunctiongesso-coreAn empty modifier set, for a test or a synthesised key event.
selectableTextNodesfunctiongesso-coreThe text nodes under a root, in the order a selection walks them.
selectionRangeOffunctiongesso-coreThe selected range on a node, if any of it is selected.
matchRangesOffunctiongesso-coreThe ranges find has highlighted on a node.

Media

Images, video and icons, all of which resolve on the shell thread and arrive as bitmaps.

NameKindPackageWhat it is
UiImagetypegesso-coreWhat the image property holds: a decoded ImageBitmap.
ImageResolverinterfacegesso-coreThe contract an application implements to turn a source into a bitmap.
DefaultImageResolverclassgesso-coreThe resolver that ships: fetch, decode, cache, and share in-flight requests.
UiVideoSurfaceinterfacegesso-coreA frame source the painter can draw, backed by a video on the shell thread.
isVideoSurfacefunctiongesso-coreNarrows a value to a video surface.
VideoPlaybackinterfacegesso-coreThe playback state a video reports back: time, duration, paused, ended.
VideoResolverinterfacegesso-coreThe contract for opening a video source and driving it.
IconRasterizerclassgesso-coreTurns icon path data into a bitmap at the size and scale it will be drawn.
IconCanvasinterfacegesso-coreThe drawing surface a rasterizer needs, so it can run in a worker.
IconContextinterfacegesso-coreThe 2D context of that surface, narrowed to what rasterizing uses.

Components

Everything gesso-components exports that a page documents, with the option types they take.

NameKindPackageWhat it is
Accordionfunctiongesso-componentsSections that expand one at a time, or several.
AccordionSectioninterfacegesso-componentsOne section: its id, its header, its content.
Alertfunctiongesso-componentsA banner that stays on the screen, in one of the three tones.
Avatarfunctiongesso-componentsA face, falling back to initials and then to a glyph.
Badgefunctiongesso-componentsA count or a short marker on something else, silent unless it is named.
Breadcrumbfunctiongesso-componentsThe trail to where you are, whose last crumb is not a link.
BreadcrumbIteminterfacegesso-componentsOne crumb: its value and the word on it.
Cardfunctiongesso-componentsA surface with padding, a radius and an elevation.
Checkboxfunctiongesso-componentsA tri-state box: checked, unchecked, mixed.
Chipfunctiongesso-componentsA pill that is on or off, for a row of filters; a toggle button that reports pressed.
DataTablefunctiongesso-componentsA sortable table over a row array, virtualized down the column.
DataColumninterfacegesso-componentsOne column: its header, its width, and how it reads a row.
DataTableSortinterfacegesso-componentsWhich column the table is sorted by, and in which direction.
Dialogfunctiongesso-componentsA modal surface in the overlay layer, with focus held inside it.
Dividerfunctiongesso-componentsA rule between things, horizontal or vertical.
FindBarfunctiongesso-componentsThe search bar over FindService, with match count and stepping.
Iconfunctiongesso-componentsOne icon from the registry, rasterized at the size it is drawn.
Imagefunctiongesso-componentsAn image with a fit, a placeholder, and an error state.
LazyListfunctiongesso-componentsA virtualized list that builds only the rows in the window.
Linkfunctiongesso-componentsWords that go somewhere, announced as a link rather than a button.
Menufunctiongesso-componentsA menu in the overlay layer, with roving focus and type-ahead.
MenuIteminterfacegesso-componentsOne item: its label, its shortcut, whether it is enabled.
Meterfunctiongesso-componentsA measurement inside a known range, with bands that decide its tone.
NumberInputfunctiongesso-componentsA numeric field with steppers, a range, and keyboard stepping.
Paginationfunctiongesso-componentsThe strip of page numbers under a paged list.
ProgressBarfunctiongesso-componentsDeterminate or indeterminate progress.
RadioGroupfunctiongesso-componentsOne choice from several, with arrow keys moving the selection.
RadioOptioninterfacegesso-componentsOne option: its value, its label, whether it is enabled.
Selectfunctiongesso-componentsA listbox in the overlay layer, opened from a closed control.
SelectOptioninterfacegesso-componentsOne option in that list.
SegmentedControlfunctiongesso-componentsOne value chosen from a few, laid out as one track of segments.
SegmentedOptioninterfacegesso-componentsOne segment: its value, its label and whether it can be chosen.
Skeletonfunctiongesso-componentsA stand-in holding the box of content that has not arrived, shimmering if asked.
SkeletonTextfunctiongesso-componentsA run of stand-in lines, the last one short, for a paragraph still loading.
Sliderfunctiongesso-componentsA value in a range, dragged or stepped.
Spinnerfunctiongesso-componentsA busy indicator, driven by the frame clock.
SplitPanefunctiongesso-componentsTwo panes and a draggable divider between them.
Switchfunctiongesso-componentsAn on or off control, with the thumb animated between.
Tabsfunctiongesso-componentsA tab strip and its panel, with arrow keys moving between tabs.
TabDefinitioninterfacegesso-componentsOne tab: its id, its label, its panel.
TextInputfunctiongesso-componentsA single-line field with selection, an IME path, and a caret.
TextAreafunctiongesso-componentsThe same field over several lines.
Toastfunctiongesso-componentsA transient message in the overlay layer, announced to the mirror.
Toolbarfunctiongesso-componentsA row of controls with one tab stop and roving focus inside.
Tooltipfunctiongesso-componentsThe tooltip surface itself, for a layout that places its own.
Treefunctiongesso-componentsA disclosure tree with levels, expansion and typed selection.
TreeNodeinterfacegesso-componentsOne node: its id, its label, its children.
Videofunctiongesso-componentsA video surface with controls, drawn into the canvas like anything else.

Testing

Rendering a tree in node and querying it through the semantics it publishes.

NameKindPackageWhat it is
renderTestfunctiongesso-testingRenders a tree in node, with a canvas double, and returns queries over it.
Renderedtypegesso-testingWhat renderTest returns: the queries, the root, and the frame control.

Devtools

Panels mounted on the shell thread, beside the canvas rather than inside it.

NameKindPackageWhat it is
createActionLogfunctiongesso-devtoolsRecords what the app did, frame by frame, for the panel to show.
mountActionLogPanelfunctiongesso-devtoolsMounts that log as a panel beside the canvas.
mountNodeInspectorfunctiongesso-devtoolsMounts the inspector: pick a node, read its resolved properties.
mountFrameProfilerfunctiongesso-devtoolsMounts the frame timeline, phase by phase.
mountErrorOverlayfunctiongesso-devtoolsShows an error from the worker over the canvas, with its stack.
connectDevtoolsfunctiongesso-devtoolsRegisters the app with the page so the devtools panel, or the Chrome extension, finds it.
mountDevtoolsPanelfunctiongesso-devtoolsMounts the panel itself, over a port, anywhere in a page.

Next

The properties page is the other generated one: every property a node can hold, with its default and what changing it invalidates.