Skip to content

Release

Velocity 2.6: Page Sections and Every Lucide Icon

2.6 adds seven free page sections, draws any Lucide icon by name with no client JavaScript, and adds brand fills. 2.6.1 lets you add blog fields without editing Velocity.

Release No. 14

Velocity 2.6 is out. It adds page sections you can build pages from, lets Icon draw any Lucide icon by name, and adds brand-coloured buttons and bands. Later the same day, 2.6.1 added one small hook we needed while moving this site onto 2.6.

Page sections

Until now Velocity stopped at components and small patterns. Every page section, from a FAQ to a closing call to action, was something you or your agent wrote by hand. 2.6 ships seven sections in src/components/blocks/:

SectionWhat it is
BandThe section wrapper the others use: tone (default, secondary, invert, brand), width, padding, an optional heading, and a background slot for a photo or texture
PageHeroThe opening band of an inner page, with the page’s only <h1>, breadcrumbs, an aside and a slot for buttons or a search form
CtaBandA closing call to action on a brand, dark or tinted panel
FaqQuestions and answers in an accordion, stacked or split beside the heading, with FAQPage structured data
StepsA numbered process as a list, a row or large numerals
TestimonialsQuotes in a grid of cards, with an optional rating
HoursOpening hours as a table, with row headers for screen readers

Copy comes in as props, so sections work with your translations, and every section takes a tone:

---
import Faq from '@/components/blocks/Faq.astro';
---

<Faq
  layout="split"
  eyebrow="FAQ"
  title="Common questions"
  items={[
    { question: 'Do sections need JavaScript?', answer: 'No. They render to HTML at build time.' },
    { question: 'Can I restyle them?', answer: 'Pass a tone, or wrap them and add classes.' },
  ]}
/>

The folder is blocks/, not sections/, on purpose. Velocity 2.5.0 gave src/components/sections/ to your project, and 2.5.1 promised to leave it alone. Upgrades replace blocks/, so fixes reach you, and anything you wrote in sections/ stays yours.

Agents use them too. .agents/components.md lists each section with its props and an example, and the agent rules now say to compose pages from sections before writing new section markup.

Every Lucide icon

Icon used to carry a hand-picked map of Lucide paths, and a name outside it drew an x. Sites added their own icon wrappers to fill the gaps.

In 2.6, Icon reads the lucide package, so any name from lucide.dev/icons works, aliases included:

<Icon name="calendar-check" size="sm" />

It draws the SVG at build time, so the icon set adds no JavaScript to your pages. An unknown name still draws an x, and now also warns during the build. The React Icon loads each icon on demand; when an island needs an icon in its first paint, import it from lucide-react by name, as Velocity’s own islands do.

The names you already use keep working. The upgrade adds the lucide package. One drawing changed: users was really Lucide’s user-plus icon, and now draws Lucide’s users icon.

Brand fills

Buttons gained variant="brand", and Band and CtaBand gained a brand tone. Three tokens control them: --brand-fill, --brand-fill-hover and --brand-ink for the text on top. The defaults put dark ink on Velocity’s default --brand-500, which passes WCAG AA for any brand hue. If your brand colour is dark, set --brand-fill to a deeper shade and --brand-ink to white in your theme.

Button sizes didn’t change. We tried taller, wrapping sizes and an xl size, and both broke every Button wrapper in the premium templates, so they’d have broken yours too.

A Breadcrumbs fix

seo/Breadcrumbs gave the current page the site’s home URL in its BreadcrumbList data. It now uses the page’s own URL.

The premium templates build on it

The premium templates used to carry their own FAQ, steps, hours table and closing band, and each kept its own icon wrapper. In 2.6 they use Velocity’s sections and add only what makes them premium: textures, photo backgrounds, live opening hours and motion. Their icons are Lucide through Icon. Every template now builds on the same Velocity you get for free.

2.6.1: blog fields without editing Velocity

Moving this site onto 2.6 turned up one gap. Our blog covers read two frontmatter fields, category and coverWord, and the only way to add a field to Velocity’s blog schema was to edit content.config.ts, a file upgrades replace.

In 2.6.1, src/config/collections.ts, which upgrades never touch, can export blogFields:

import { z } from 'astro/zod';

export const siteCollections = {};

export const blogFields = () => ({
  category: z.enum(['release', 'guide', 'engineering', 'news']).default('release'),
  coverWord: z.string().max(12).optional(),
});

Velocity merges them into the blog schema and keeps their types, so post.data.category type-checks. If you added blog fields in content.config.ts, the upgrade saves your copy in .velocity-backup/; move the fields into blogFields.

Upgrading

pnpm create velocity-astro@latest upgrade

The upgrade adds src/components/blocks/ and the lucide package. Your pages, views, theme and sections/ folder are left as they are. Run pnpm build and check the log for [Icon] warnings, which name any icon Lucide doesn’t recognise.

All posts
Share:

Related posts