solid-route-progress

Introduction

import { Router } from '@solidjs/router'
import { Suspense } from 'solid-js'
import { RouteProgress } from 'solid-route-progress/router'
import 'solid-route-progress/style.css'

<Router
  root={(props) => (
    <>
      <RouteProgress />
      <Suspense>{props.children}</Suspense>
    </>
  )}
/>

Entry points

EntryExports
solid-route-progresscreateProgress, <Progress>, <ProgressProvider>, <Bar>, useProgress(), createCrossDocumentProgress(), IGNORE_ATTRIBUTE
solid-route-progress/router<RouteProgress>, createRouteProgress()
solid-route-progress/navigation<NavigationProgress>, createNavigationProgress()
solid-route-progress/style.cssthe stylesheet

What JavaScript writes

WrittenOnValue
--sp-valuethe bar0 to 1, the target of the CSS transition
--sp-speedthe barthe speed option
data-statethe baridle | trickle | active | done
data-errorthe barduring the done phase of a failed load
data-sp-busy<html>while any bar is visible

Everything else is CSS.

Size

Modulemingzipbrotli
solid-route-progress467621431949
createProgress alone1589823762
solid-route-progress/router1025610524
solid-route-progress/navigation933503425
solid-route-progress/style.css1167531437

Zero dependencies.

Next

Installation · Quick start · Examples