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.

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>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Obsidian Launcher

The whole style →

AI Agent Bento Showcase

Feature sections

Frosted Pill Navbar

Headers & nav bars

Centered Glow Hero

Heroes

Light Pill Download Button

Buttons

Launcher Window Showcase

Media & mockups

Keycap Feature Grid

Feature sections