Blog Feed Header

Blog feed header with filters

Marketing BlockBlog

Overview

A header section for blog listing pages. Renders a title row with an optional search input, and a row of category filter pills below.

Usage

import { BlogFeedHeader } from "@leanicon/web-builder-library";

Default

Heading with category pills and search input. Pass onSearchChange to show the search field and onCategoryChange to enable pill selection.

The LeanIcon Blog

When onSearchChange is not provided, the search input is hidden.

The LeanIcon Blog

Without categories

When categories is omitted, only the heading and search input are rendered.

The LeanIcon Blog

Heading only

When both categories and onSearchChange are omitted, only the heading is rendered.

The LeanIcon Blog

Custom search placeholder

Override the placeholder text via searchPlaceholder.

The LeanIcon Blog

Active category selected

Shows a non-default pill as active.

The LeanIcon Blog

Dark mode

The LeanIcon Blog

Dark mode — heading only

The LeanIcon Blog

Props

Prop

Type

Default

Description

heading

string

—

Page title (required)

categories

CategoryFilter[]

—

Category filter pills

activeCategory

string

—

Value of the currently active pill

onCategoryChange

(value: string) => void

—

Called when a category pill is clicked

searchValue

string

""

Controlled value for the search input

onSearchChange

(value: string) => void

—

Called on search input change — hides input if omitted

searchPlaceholder

string

"Search posts"

Placeholder text for the search input

colorScheme

"light" | "dark"

—

Force light or dark mode

className

string

—

Additional CSS classes on root

CategoryFilter

Prop

Type

Description

label

string

Display text for the pill

value

string

Value passed to onCategoryChange

Notes

  • The search input only renders when onSearchChange is provided.
  • Category pills only render when categories has at least one entry.
  • The active pill gets bg-primary text-primary-foreground; inactive pills get an outlined style.
  • Dark mode: pass colorScheme="dark" or place inside a .dark ancestor.

Props

NameTypeDefaultRequiredDescription
headingstring—Yes
categoriesCategoryFilter[]—No
activeCategorystring—No
onCategoryChange((value: string) => void)—No
searchValuestring—No
onSearchChange((value: string) => void)—No
searchPlaceholderstringSearch postsNo
colorSchemeenum—No
classNamestring—No
headingLevelenumh1NoDefaults to h1 (page-surface usage); pass 'h2' when embedded under a page h1 (spec 007 D7).