Remote Compose Storybook

Remote Compose Storybook: every Jetpack Remote Compose component, live

Every public @RemoteComposable building block of Jetpack Remote Compose: live, with its code, docs and the document it produces.

Layout

  • RemoteBox: A container that stacks things on top of each other, like layers in a design tool, and pins them to a corner, an edge or the centre.
  • RemoteRow: Places items side by side, left to right, and decides how leftover horizontal space is shared between them.
  • RemoteColumn: Stacks items top to bottom and decides how leftover vertical space is shared between them.
  • RemoteArrangement.spacedBy: A fixed gap between every item in a row or a column, like auto-layout spacing in Figma.
  • RemoteSpacer: An invisible gap. A fixed spacer adds a set distance; a flexible one pushes the next item to the far end.
  • RemoteCollapsibleColumn / Row: A row or column that hides its least important items when space runs out, instead of squashing or cutting them.
  • RemoteFitBox: Holds several versions of the same content, large to small, and shows the biggest one that fits. The device decides, not the server.

Content

  • RemoteText: Shows text with a chosen size, colour, weight, font, alignment and line limit, ending in “…” when it does not fit.
  • RemoteBasicText: The simplest piece of text, with no built-in styling: the building block that richer text is made from.
  • RemoteImage: Shows a picture, embedded in the screen or loaded from a web address, cropped or fitted into its box.
  • RemoteBasicImage: The simplest picture element, without extra behaviour.
  • RemoteBasicIcon: A small vector icon that stays sharp at any size and can be recoloured.

Canvas

  • RemoteCanvas: A free drawing surface: shapes, lines, text and transformations drawn exactly where you place them, including animated drawings.
  • RemoteBrush: Colour gradients — straight, circular or sweeping — used to fill shapes.
  • Shapes as outlines: Turns a shape such as a rounded rectangle into something that can be filled or used as a mask while drawing.
  • drawWithContent: Draws extra decoration behind or on top of any component, without changing the component itself.
  • remoteComponent(): Lets an element know its parent's real size on the device, so it can size itself as a fraction of it.

Modifiers

  • Size: Controls how big something is: an exact size, a share of the available space, a minimum or maximum, or just as big as its content.
  • Padding, offset, zIndex: Inner spacing around content, nudging an element away from its position, and choosing which of two overlapping elements is on top.
  • Background, border, clip: Fills an element with colour or an image, gives it an outline, and rounds or reshapes its corners.
  • alpha, rotate, scale, graphicsLayer: Fades, rotates, scales, tilts in 3D or drops a shadow under an element, without moving anything around it.
  • visibility: Shows or hides an element, either keeping its space or letting the layout close the gap. The device can switch it without a new screen from the server.
  • verticalScroll / horizontalScroll: Lets content that is longer or wider than its box scroll, with optional snapping, handled entirely on the device.
  • alignByBaseline: Lines up texts of different sizes on the same baseline, the way typographers align them.

Interaction

  • clickable + valueChangeAction: Makes something tappable and changes what is shown immediately on the device — toggles, counters, selections — with no trip to the server.
  • hostAction / combinedAction: A tap that tells the app around the screen to do something, such as open a page or save a bookmark, optionally while also updating the screen.
  • onTouchDown / Up / Cancel: Reacts to the moment a finger goes down, lifts, or slides away, for press-and-hold feedback.
  • semantics: Describes elements to screen readers and other assistive technology: what they are, what state they are in, what they do.

Animation

  • animateRemote*AsState: Smoothly animates a value such as size or transparency when it changes, with a chosen speed and feel (ease, bounce, spring).
  • animateEnterExit / animationSpec: Animations that play when an element appears or disappears: fade, slide in from an edge, rotate or dissolve into particles.
  • sharedElement / sharedBounds: Moves the same element smoothly from one layout to another, so users can follow it between two states of the screen.

State & expressions

  • RemoteStateLayout: Holds several versions of a screen — for example loading, content and error — and shows the right one for the current state, switching on the device.
  • rememberNamedRemote*: Values with a name, such as a title or a colour, that the app showing the screen can change later without the server sending a new design.
  • RemoteFloat expressions: Calculations that run on the device, every frame if needed, so things can move or resize from math or time without new data.
  • RemoteColor expressions: Colours computed on the device: blends between two colours, rotating hues or changing transparency.
  • Time & configuration: Things only the device knows: the current time and date, and the screen's size, density and text size.

Recipes

  • Product card: A complete shop card built from the blocks on this site, with a working cart button.
  • Weather widget: A widget that rearranges itself for its size and shows live data the app supplies.
  • Onboarding: A multi-step flow whose steps all arrive at once and run on the device.
  • Media player: Playback controls with a moving progress bar, all animated on the device.
  • Settings screen: A list of switches the user flips on the device and values the app keeps up to date.

Loading the player…

Loading the Remote Compose player

Starting…