Specialized
Distinct, single-purpose pieces with their own look. Use them as they are or as a starting point.
Installation & usage
npx @youj/cli add app-step-pathAlso installs alert, badge, button, card, counter, empty, icon-arrow-right, icon-flame, icon-more-horizontal, progress-path, segmented-meter, skeleton, typography, use-announcer, youj-core, youj-presets, youj-ui-core.
The CLI copies the block to blocks/app/step-path.tsx with every component it uses, so it’s yours to edit.
Every prop is optional and falls back to the demo, so it renders as you see it until you pass your own. Give it your data, rewrite or translate its strings through copy, and connect its actions:
'use client'
import { StepPath, type StepPathProps } from '@/blocks/app/step-path'
export function StepPathView({ sections, level, week }: Pick<StepPathProps, 'sections' | 'level' | 'week'>) {
return (
<StepPath
sections={sections}
level={level}
week={week}
copy={{ title: 'Spanish' }}
onOpenStep={(step) => {
// your code
}}
onRetry={() => {
// your code
}}
/>
)
}Description
A course as a trail of steps in sections, each ringed by its mastery with the current one ready to start; here a coding course, halfway through Functions with today's goal already met, so the streak reads kept and the next level is 40 XP away. Beside it sit the points to the next level, the week's streak and today's goal. The same path lays out an onboarding by weeks and tasks or a fitness program by phases and workouts.
Show a personal bank’s home: the balance with its hide-amounts toggle, a swipeable card carousel, spending by category, budgets and a day-grouped activity list, with a send-money flow that adds the payment to today.
Demo only. Its content is fixed in the block: it takes no data or copy props, only the few settings and callbacks listed in its props. Copy the source to build on it.
Show a personal bank’s home: the balance with its hide-amounts toggle, a swipeable card carousel, spending by category, budgets and a day-grouped activity list, with a send-money flow that adds the payment to today.
Demo only. Its content is fixed in the block: it takes no data or copy props, only the few settings and callbacks listed in its props. Copy the source to build on it.
Review work together on one board: live chart and stat cards among sticky notes and connectors, teammates’ cursors moving with the board, and comment pins that open a thread to answer and resolve, under breadcrumbs, who is here and Share.
Review work together on one board: live chart and stat cards among sticky notes and connectors, teammates’ cursors moving with the board, and comment pins that open a thread to answer and resolve, under breadcrumbs, who is here and Share.
A recording as a listening instrument, whether a podcast episode, a lecture or an audiobook: chapter and clock, a waveform scrubber with chapter ticks, a transport with back 15 and forward 30, a speed fader and a Clip tool that brackets half a minute to share.
Code
Step Path, the Step path story: the files youj add writes.
blocks/app
Reference
Props19 props, 1 types
Props
| Prop | Type | |
|---|---|---|
theme | ThemeInputWraps the block in this theme. Default: the theme around it. | – |
embedded | booleanInside another app: a default true | true |
fill | booleanTake the whole width it's given instead of stopping at its natural width (1088px at 100% scale). default false | false |
copy | Partial<StepPathCopy>Any of the block's strings, to rewrite or translate. | – |
locale | stringHow its dates, times and numbers read (BCP 47). Default: | – |
sections | ProgressPathSection[]The trail: sections of steps in order. default demo | demo |
current | stringThe step up next. default the demo's | the demo's |
points | numberPoints so far. default 1,240 | 1,240 |
stepPoints | numberPoints a finished step earns. default 20 | 20 |
level | StepPathLevelThe level the points are working toward: its number and the points at its start and end. default level 7, 1,000 to 1,500 | level 7, 1,000 to 1,500 |
goal | numberPoints a day aims for. default 50 | 50 |
format | Intl.NumberFormatOptionsIntl.NumberFormat options for every figure of points. Default: plain numbers in the locale. | – |
week | (number | null)[]Points earned each day this week, Monday first; default the demo's week, with nothing done today | the demo's week, with nothing done today |
streak | numberDays in a row up to yesterday; today adds one once a step is done. default 12 | 12 |
onOpenStep | (step: StepPathStep) => voidCalled when a step is opened from the trail. | – |
loading | booleanSkeletons in place of the trail and the figures while your course loads. default false | false |
error | stringShown in place of the trail when it fails to load, with Retry when | – |
onRetry | () => voidRetries after an | – |
empty | ReactNodeReplaces the message when there are no sections. Default: | – |
StepPathLevel
| Prop | Type | |
|---|---|---|
numberRequired | number | – |
fromRequired | number | – |
toRequired | number | – |
Strings31 keys for copy
Strings
copy takes any of these keys; the rest keep their defaults. A key whose text holds a value (a count, a name) takes a function.
titlesubtitlemorepathstepspracticecontinuecontinueTofinishedcompletedprogressweeklevelpointstotaltoLeveltoGodailyGoalgoalMetstreakstreakDaysstreakHintstreakKeptthisWeekdayPointsloadingLabelerrorTitleretryemptyTitleemptyDescriptionlocale