Template picker gallery — Onboarding block
Proonboarding-template-picker-gallery · for app, onboarding pages
Template picker gallery
An empty workspace or a "New" page with six templates or more: a filterable grid of preview cards, "Start from scratch" first.
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-galleryUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import OnboardingTemplatePickerGallery from '@/components/trame/blocks/onboarding/onboarding-template-picker-gallery.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>
<OnboardingTemplatePickerGallery v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe gallery’s heading ("Start from a template") |
| intro | string | Wordsone line under the heading |
| templates* | Template[] | the templates, 1 to 24, in the order shown |
| categories | string[] | 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 |
| use | string | Actionopens a template: each one links to `href(use, template)`; without it, or when the page lacks it, there is no link |
| select | Select | picking several templates and sending them at once: a checkbox per template and one button |
| blank | Blank | the way to start empty, e.g. "Start from scratch" |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Template templates[] · 8 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe template’s key: sent in `ids` when it is picked, and the record `use` receives |
| name* | string | Wordsthe template’s name ("Content calendar") |
| description | string | Wordsone or two sentences on what it sets up ("A month of posts by channel, with owners and due dates") |
| category | string | Wordsthe category it belongs to, written as in `categories` ("Marketing") |
| image | string | Picturea preview of what the template makes; a quiet tile with its name when absent |
| alt | string | Wordswhat the preview shows, when the name does not say it |
| badge | string | Wordsa short mark, the merchant’s own only ("New") |
| meta | string | Wordsa short fact about it ("12 pages", "4 views") |
Select select · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe button that sends the picked templates ("Add to workspace") |
| action* | string | Actionreceives `{ ids }`, the picked templates’ ids; posted natively, one `ids` field per pick |
Blank blank · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a 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).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your 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:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too 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
templatesfrom your app
A onboarding section, for app, onboarding pages; it uses @lucide/vue, 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.