Headers & navigation / Tab bars
Blog Category Filter Row
Inline row of text filters (All Posts, News, Company, Craft) where the active one is a dark filled chip with white text, plus an RSS icon aligned right.
Rebuilt from raycast.com/blog in the Obsidian Launcher style.
npx shadcn@latest add https://justyoink.it/r/obsidian-launcher/blocks/blog-filter-tabs.json
Looks exactly like raycast.com: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/obsidian-launcher/mine/blog-filter-tabs.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: categories (string[]), defaultActive, onChange(category), rssHref. The active chip is stored in local state; inactive links fade from grey to white on hover.
components/blog-filter-tabs.tsx
import { useState } from "react"; export default function BlogCategoryFilterRow(props: { categories?: string[]; defaultActive?: string; onChange?: (category: string) => void; rssHref?: string; }) { const { categories = ["All Posts", "News", "Company", "Craft"], defaultActive = "All Posts", onChange, rssHref = "#", } = props; const [active, setActive] = useState(defaultActive); return ( <div className="w-full bg-canvas px-4 py-6"> <nav aria-label="Blog categories" className="mx-auto flex max-w-[1000px] items-center justify-between gap-4" > <ul className="flex flex-wrap items-center gap-1"> {categories.map((c) => { const isActive = c === active; return ( <li key={c}> <a href="#" aria-current={isActive ? "page" : undefined} onClick={(e) => { e.preventDefault(); setActive(c); onChange?.(c); }} className={ "inline-block rounded-md px-[10px] py-[6px] text-ui font-medium transition-colors duration-link-color ease-link-color focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-red " + (isActive ? "bg-surface text-primary" : "text-secondary hover:text-primary") } > {c} </a> </li> ); })} </ul> <a href={rssHref} aria-label="RSS feed" className="rounded-md p-1 text-secondary transition-colors duration-link-color ease-link-color hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-red" > <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" aria-hidden="true"> <circle cx="3" cy="13" r="1.2" fill="currentColor" stroke="none" /> <path d="M2.5 7.5a6 6 0 0 1 6 6" /> <path d="M2.5 3a10.5 10.5 0 0 1 10.5 10.5" /> </svg> </a> </nav> </div> ); }import { useState } from "react"; export default function BlogCategoryFilterRow(props: { categories?: string[]; defaultActive?: string; onChange?: (category: string) => void; rssHref?: string; }) { const { categories = ["All Posts", "News", "Company", "Craft"], defaultActive = "All Posts", onChange, rssHref = "#", } = props; const [active, setActive] = useState(defaultActive); return ( <div className="w-full bg-background px-4 py-6"> <nav aria-label="Blog categories" className="mx-auto flex max-w-[1000px] items-center justify-between gap-4" > <ul className="flex flex-wrap items-center gap-1"> {categories.map((c) => { const isActive = c === active; return ( <li key={c}> <a href="#" aria-current={isActive ? "page" : undefined} onClick={(e) => { e.preventDefault(); setActive(c); onChange?.(c); }} className={ "inline-block rounded-lg px-[10px] py-[6px] text-obsidian-ui font-medium transition-colors duration-obsidian-link-color ease-obsidian-link-color focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary " + (isActive ? "bg-card text-foreground" : "text-muted-foreground hover:text-foreground") } > {c} </a> </li> ); })} </ul> <a href={rssHref} aria-label="RSS feed" className="rounded-lg p-1 text-muted-foreground transition-colors duration-obsidian-link-color ease-obsidian-link-color hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary" > <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" aria-hidden="true"> <circle cx="3" cy="13" r="1.2" fill="currentColor" stroke="none" /> <path d="M2.5 7.5a6 6 0 0 1 6 6" /> <path d="M2.5 3a10.5 10.5 0 0 1 10.5 10.5" /> </svg> </a> </nav> </div> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.