flemov1.5.7

API Reference

Every export from `flemo`, with the page that explains it

Components

ExportSummaryMore
RouterRoot container. Renders the active screen.Router
RouteMaps a path (or paths) to an element.Router
ScreenPer-route screen container with app/nav/safe-area slots.Screen
LayoutScreenScreen variant for shared layoutId morphs across screens.Screen
LayoutConfigWraps motion children with the current screen's transition timing.

Hooks

ExportReturnsMore
useNavigate(){ push, replace, pop }Navigation
useParams<T>()The current route's params (path + query merged)Navigation
useStep<T>(){ pushStep, replaceStep, popStep } for sub-statesNavigation
useScreen()Current screen meta (id, isActive, zIndex, …)
useViewportScrollHeight()Visual-viewport scroll metrics, useful for mobile keyboards

Transition factories

ExportWhen to use
createTransitionSix-phase transitions (idle / enter / exit / enterBack / exitBack)
createRawTransitionFull control over every navigate state
createDecoratorSix-phase decorator (e.g., overlays between screens)
createRawDecoratorDecorator with full per-state control

See Transitions for examples.

Built-in transition names

"cupertino" · "material" · "layout" · "none"

Built-in decorator names

"overlay"

Type registries

InterfacePurpose
RegisterRouteRegister your routes for type-safe navigate.push and useParams
RegisterTransitionRegister custom transition names
RegisterDecoratorRegister custom decorator names
declare module "flemo" {
  interface RegisterRoute {
    /* … */
  }
  interface RegisterTransition {
    /* … */
  }
  interface RegisterDecorator {
    /* … */
  }
}

Type exports

ScreenProps · TransitionName · RegisterTransition · DecoratorName · RegisterDecorator

Peer dependencies

react ^19 · react-dom ^19 · motion ^12

On this page