App introduction browser — Hero block

Pro

hero-app-introduction-browser · for home, landing, app pages

App introduction browser

A screenshot of the product in a window: software or an app whose interface is the argument — the merchant’s own only.

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/hero-app-introduction-browser

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import HeroAppIntroductionBrowser from '@/components/trame/blocks/hero/hero-app-introduction-browser.vue'

const props = {
title: "The business account that does the bookkeeping as you go",
subtitle: "Fernbank gives small companies cards, invoicing and payouts in one place, and matches every payment to its receipt.",
checklist: [
"Cards for every employee",
"Invoices matched automatically"
],
primaryAction: {
label: "Open an account",
action: "signup"
},
secondaryAction: {
label: "See the pricing",
action: "page",
record: {
id: "pricing"
}
},
rating: {
value: "4.8/5",
label: "based on our customers’ reviews",
avatars: [
{
name: "Customer 1",
alt: "A smiling customer"
},
{
name: "Customer 2",
alt: "A smiling customer"
}
]
},
panel: {
image: "https://images.unsplash.com/photo-1654263937085-48fb17a63d66?w=1600&q=80",
alt: "A blue bank card held out to a handheld card terminal",
caption: "Paid in, sorted, ready for your books"
},
options: {
eyebrow: "Business banking",
note: "No monthly fee for your first year",
url: "app.fernbank.example/overview"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe promise, in a sentence
subtitlestringWordswhat it is and for whom, in one or two sentences
checkliststring[]Wordsone thing the visitor gets, a few words
primaryAction*PrimaryActionthe main button: its words and the page action it runs
secondaryActionSecondaryActiona quieter second action beside the main one: its words and the page action
ratingRatingthe app’s rating, as the merchant states it
panel*Panelthe panel beside the words: a picture or a figure
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
PrimaryAction primaryAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("Try for free")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
SecondaryAction secondaryAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("Try for free")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Rating rating · 3 props
PropTypeDescription
value*stringWordsthe rating as the merchant states it ("4.8 / 5")
label*stringWordswhat it rests on ("from 1,200 customer reviews")
avatarsAvatar[]a few real users’ pictures beside the rating
Avatar rating.avatars[] · 3 props
PropTypeDescription
name*stringWordsthe avatar’s name
alt*stringWordswho the picture shows
srcstringPicturea picture: a root-relative path (/media/…) or an absolute URL
Panel panel · 3 props
PropTypeDescription
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordsthe picture’s description
captionstringWordsa line on a card laid over the picture, or under the window
Options options · 6 props
PropTypeDescription
eyebrowstringWordsa short chip above the title
notestringWordsfine print under the actions
urlstringWordsthe address shown in the window of app-panel
flipbooleantrue: swaps the sides
background'aurora' | 'pattern' | 'none'the section’s background: aurora, pattern, none
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
  • Expressive motion, within its budget; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: primaryAction, secondaryAction

A hero section, for home, landing, app pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

Built with

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

More hero blocks

  • Audience centered: a pill switch above a centred promise, the chosen side’s picture in a wide frame below: a two-sided product whose sides weigh the same and whose pictures read best wide (freelancers and companies, patients and practitioners).
  • Audience split: the switch and the words on the left, the chosen side’s picture tall on the right: a two-sided product with portrait pictures of people at work, or a page that needs its actions high on the first screen.
  • Bento cascade: the promise in a tall cell, the collections as tall portrait cards overlapping in a rising staircase beside it: 2 to 4 collections with tall, graphic pictures, for a shop that wants depth more than a grid.
  • Bento promise left: the promise in a tall cell on the left, the collections’ pictures in a grid beside it: 3 or 4 collections to open at once.
  • Bento promise top: the promise as a wide band across the top, the collections’ pictures in a row under it: 2 or 3 collections, or a long promise.
  • Brand statement poster: a condensed, oversized headline in capitals on a flat brand field, a ruled strip of facts and one picture on the half: a launch, an event, a bold brand.
  • Brand statement type behind: a huge centred headline with one framed upright picture standing over its middle, the facts in a ruled strip: an editorial or portfolio opening.
  • Brand statement type mask: a one- or two-word statement (a name, a place) at the viewport’s scale with the first picture showing only through its letters, faint behind too: a brand with one striking texture picture (rock, fabric, wood).

All 102 hero blocks