Pasito

A tiny, fully-themeable, and dependency-free fluid stepper component.

Vertical

Set orientation="vertical" and the stepper stacks top-to-bottom. Works well as a sidebar rail or alongside vertically-scrolling content.

Works by Takashi Murakami and Virgil Abloh

Autoplay

The useAutoPlay hook drives timed step changes with a visible fill animation. Pause, resume, and loop are all built in.

Library in the Earth by Hiroshi Nakamura & NAP

Themes

Every visual detail is controlled by CSS custom properties — colors, sizes, radii, spacing. Override a few variables to match your branding needs.

$ _

Installation

npm i pasito

Or tell your agent:

Install pasito (npm i pasito). Import the Stepper component and pasito/styles.css, then add a stepper to my file with 5 steps and click-to-navigate.

Usage

import { useState } from 'react'
import { Stepper } from 'pasito'
import 'pasito/styles.css'
 
function Stepper() {
const [active, setActive] = useState(0)
 
return (
<Stepper
count={5}
active={active}
onStepClick={setActive}
/>
)
}

Autoplay Usage

import { useState } from 'react'
import { Stepper, useAutoPlay } from 'pasito'
import 'pasito/styles.css'
 
function AutoStepper() {
const [active, setActive] = useState(0)
 
const { playing, toggle, filling, fillDuration } = useAutoPlay({
count: 5,
active,
onStepChange: setActive,
stepDuration: 5000,
loop: true,
})
 
return (
<Stepper
count={5}
active={active}
onStepClick={setActive}
filling={filling}
fillDuration={fillDuration}
/>
)
}

API Reference

<Stepper />

PropTypeDescription
countnumberTotal number of steps
activenumberZero-based active step index
onStepClick(index: number) => voidCalled when a step is clicked
orientation"horizontal" | "vertical"Layout direction. Default: "horizontal"
maxVisiblenumberVisible steps before windowing kicks in
transitionDurationnumberTransition duration in ms. Default: 500
easingstringCSS timing function. Default: cubic-bezier(0.215, 0.61, 0.355, 1)
fillingbooleanShow fill progress on active step. Default: false
fillDurationnumberFill animation duration in ms. Default: 3000
classNamestringCSS class for variable overrides

useAutoPlay(options)

Options:

PropTypeDescription
countnumberTotal number of steps
activenumberCurrent active step
onStepChange(index: number) => voidCallback to advance step
stepDurationnumberTime per step in ms. Default: 3000
loopbooleanLoop back to first step. Default: true
enabledbooleanEnable/disable autoplay. Default: true

Returns:

NameTypeDescription
playingbooleanCurrent playback state
toggle() => voidToggle play/pause
fillingbooleanPass to Stepper filling prop
fillDurationnumberPass to Stepper fillDuration prop

Theming

Override CSS custom properties via a class passed to className.

VariableDefaultDescription
--pill-dot-size8pxDiameter of inactive dots
--pill-active-width24pxWidth of the active pill
--pill-gap6pxSpace between steps
--pill-bgrgba(0,0,0,0.12)Inactive dot color
--pill-active-bgrgba(0,0,0,0.8)Active pill color
--pill-fill-bgrgba(255,255,255,0.45)Autoplay fill bar color
--pill-container-bgrgba(0,0,0,0.04)Container background
--pill-container-borderrgba(0,0,0,0.06)Container border color
--pill-container-radius999pxContainer border radius
/* Dark theme example */
.my-dark-stepper {
--pill-bg: rgba(255, 255, 255, 0.15);
--pill-active-bg: rgba(255, 255, 255, 0.9);
--pill-fill-bg: rgba(255, 255, 255, 0.3);
--pill-container-bg: rgba(255, 255, 255, 0.1);
--pill-container-border: rgba(255, 255, 255, 0.12);
}

Accessibility

  • • Steps use role="tab" with aria-selected
  • • Each step has an aria-label (e.g. "Step 1")
  • • Active step is keyboard focusable via tabIndex=0
  • • Respects prefers-reduced-motion — all transitions resolve instantly