Template picker list preview — Onboarding block

Pro

onboarding-template-picker-list-preview · for app, onboarding pages

Template picker list preview

Templates whose look decides the choice (documents, sites, boards): a list of names on the left, the chosen template’s large preview and its action on the right.

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/onboarding-template-picker-list-preview

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import OnboardingTemplatePickerListPreview from '@/components/trame/blocks/onboarding/onboarding-template-picker-list-preview.vue'

const props = {
title: "Start from a template",
intro: "Each one sets up views, fields and a few sample rows you can delete. You can change everything afterwards.",
templates: [
{
id: "content-calendar",
name: "Content calendar",
description: "A month of posts by channel, with owners and due dates.",
category: "Marketing",
meta: "3 views",
badge: "New",
alt: "A month grid with posts on some days",
image: "data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20320%20200%22%3E%3Crect%20width%3D%22320%22%20height%3D%22200%22%20fill%3D%22hsl(260%2030%25%2096%25)%22%2F%3E%3Crect%20x%3D%2216%22%20y%3D%2216%22%20width%3D%22288%22%20height%3D%22168%22%20rx%3D%228%22%20fill%3D%22white%22%20stroke%3D%22hsl(260%2015%25%2085%25)%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%2228%22%20width%3D%2296%22%20height%3D%2210%22%20rx%3D%225%22%20fill%3D%22hsl(260%2010%25%2030%25)%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22107%22%20y%3D%2262%22%20width%3D%2228%22%20height%3D%226%22%20rx%3D%222%22%20fill%3D%22hsl(260%2070%25%2092%25)%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%2250%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2231%22%20y%3D%2293%22%20width%3D%2228%22%20height%3D%226%22%20rx%3D%222%22%20fill%3D%22hsl(260%2065%25%2058%25)%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22221%22%20y%3D%2293%22%20width%3D%2228%22%20height%3D%226%22%20rx%3D%222%22%20fill%3D%22hsl(260%2070%25%2092%25)%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%2281%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22145%22%20y%3D%22124%22%20width%3D%2228%22%20height%3D%226%22%20rx%3D%222%22%20fill%3D%22hsl(260%2065%25%2058%25)%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%22112%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2266%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2269%22%20y%3D%22155%22%20width%3D%2228%22%20height%3D%226%22%20rx%3D%222%22%20fill%3D%22hsl(260%2070%25%2092%25)%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22104%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22142%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22180%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22256%22%20y%3D%22143%22%20width%3D%2234%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22hsl(260%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22259%22%20y%3D%22155%22%20width%3D%2228%22%20height%3D%226%22%20rx%3D%222%22%20fill%3D%22hsl(260%2065%25%2058%25)%22%2F%3E%3C%2Fsvg%3E"
},
{
id: "sprint-board",
name: "Sprint board",
description: "Tasks from backlog to done, sized and assigned.",
category: "Engineering",
meta: "4 views",
alt: "Three columns of task cards",
image: "data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20320%20200%22%3E%3Crect%20width%3D%22320%22%20height%3D%22200%22%20fill%3D%22hsl(210%2030%25%2096%25)%22%2F%3E%3Crect%20x%3D%2216%22%20y%3D%2216%22%20width%3D%22288%22%20height%3D%22168%22%20rx%3D%228%22%20fill%3D%22white%22%20stroke%3D%22hsl(210%2015%25%2085%25)%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%2228%22%20width%3D%2296%22%20height%3D%2210%22%20rx%3D%225%22%20fill%3D%22hsl(210%2010%25%2030%25)%22%2F%3E%3Crect%20x%3D%2228%22%20y%3D%2250%22%20width%3D%2284%22%20height%3D%22122%22%20rx%3D%226%22%20fill%3D%22hsl(210%2020%25%2097%25)%22%2F%3E%3Crect%20x%3D%2234%22%20y%3D%2258%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2240%22%20y%3D%2266%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2240%22%20y%3D%2275%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2065%25%2058%25)%22%2F%3E%3Crect%20x%3D%2234%22%20y%3D%2294%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2240%22%20y%3D%22102%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2240%22%20y%3D%22111%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2234%22%20y%3D%22130%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2240%22%20y%3D%22138%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%2240%22%20y%3D%22147%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22120%22%20y%3D%2250%22%20width%3D%2284%22%20height%3D%22122%22%20rx%3D%226%22%20fill%3D%22hsl(210%2020%25%2097%25)%22%2F%3E%3Crect%20x%3D%22126%22%20y%3D%2258%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22hsl(210%2070%25%2092%25)%22%2F%3E%3Crect%20x%3D%22132%22%20y%3D%2266%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22132%22%20y%3D%2275%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2065%25%2058%25)%22%2F%3E%3Crect%20x%3D%22126%22%20y%3D%2294%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22132%22%20y%3D%22102%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22132%22%20y%3D%22111%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22126%22%20y%3D%22130%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22132%22%20y%3D%22138%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22132%22%20y%3D%22147%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22212%22%20y%3D%2250%22%20width%3D%2284%22%20height%3D%22122%22%20rx%3D%226%22%20fill%3D%22hsl(210%2020%25%2097%25)%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%2258%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22224%22%20y%3D%2266%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22224%22%20y%3D%2275%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2065%25%2058%25)%22%2F%3E%3Crect%20x%3D%22218%22%20y%3D%2294%22%20width%3D%2272%22%20height%3D%2228%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%22224%22%20y%3D%22102%22%20width%3D%2244%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3Crect%20x%3D%22224%22%20y%3D%22111%22%20width%3D%2228%22%20height%3D%225%22%20rx%3D%224%22%20fill%3D%22hsl(210%2010%25%2088%25)%22%2F%3E%3C%2Fsvg%3E"
}
],
categories: [
"Marketing",
"Engineering"
],
use: "template.open",
blank: {
label: "Start from scratch",
action: "project.new"
}
}
</script>

<template>
<OnboardingTemplatePickerListPreview v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe gallery’s heading ("Start from a template")
introstringWordsone line under the heading
templates*Template[]the templates, 1 to 24, in the order shown
categoriesstring[]Wordsthe categories of the filter, in order; a category no template has is left out, one a template has and the list misses is added at the end. The filter shows from two categories
usestringActionopens a template: each one links to `href(use, template)`; without it, or when the page lacks it, there is no link
selectSelectpicking several templates and sending them at once: a checkbox per template and one button
blankBlankthe way to start empty, e.g. "Start from scratch"
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Template templates[] · 8 props
PropTypeDescription
id*string | numberDatathe template’s key: sent in `ids` when it is picked, and the record `use` receives
name*stringWordsthe template’s name ("Content calendar")
descriptionstringWordsone or two sentences on what it sets up ("A month of posts by channel, with owners and due dates")
categorystringWordsthe category it belongs to, written as in `categories` ("Marketing")
imagestringPicturea preview of what the template makes; a quiet tile with its name when absent
altstringWordswhat the preview shows, when the name does not say it
badgestringWordsa short mark, the merchant’s own only ("New")
metastringWordsa short fact about it ("12 pages", "4 views")
Select select · 2 props
PropTypeDescription
label*stringWordsthe button that sends the picked templates ("Add to workspace")
action*stringActionreceives `{ ids }`, the picked templates’ ids; posted natively, one `ids` field per pick
Blank blank · 4 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan address outside the app
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: link, selection.submit, blank
  • Reads templates from your app

A onboarding section, for app, onboarding pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More onboarding blocks

  • Checklist cards: a few substantial steps, each a row card with its number and a button on the current one.
  • Checklist preview: A selectable step list beside its explanation and action, using the account’s real completion states.
  • Checklist rail: a new account’s set-up as a vertical path: done steps checked, the current one with its action, the rest dashed.
  • Checklist ring: A compact setup card with a static completion ring and every account step visible.
  • Setup progress compact: a quiet checklist on the app home: one line per step, a progress bar and the next step when almost done.
  • Welcome questions all at once: One or two short questions, or people who like to see everything: every question on one page as a grid of cards beside its number, the fields and the button at the foot.
  • Welcome questions one by one: Right after sign-up, three to six questions: one at a time in a calm centred column, a step count and Back, the next question shown once the current one is answered.
  • Welcome questions side preview: A wide screen where the answers shape what comes next: the questions as lists on the left, a quiet panel on the right summing up the answers so far.

All 10 onboarding blocks