komal.nakrani
Browse Themes
ThemesCategoriesDocsBlogTips & Tricks
Insights & Documentation

Engineering High-Performance Web Themes

Deep-dives into Astro framework, Content Collections, MDX components, web performance optimization, and theme design.

Recent Articles

An Accessible Astro Accordion Component

Build an Astro accordion two ways: zero-JS with details and summary, or a button-based version with aria-expanded. Copy-paste code, styles and when to use each.

Read ➔

Astro Breadcrumbs with BreadcrumbList Schema

A copy-paste Astro breadcrumbs component: accessible nav markup, aria-current on the last item, and BreadcrumbList JSON-LD built from the same list of links.

Read ➔

Astro Components: The Complete Guide

Astro components are .astro files that render HTML on the server: frontmatter, props, slots, scoped styles, scripts and islands, with Astro 7 examples.

Read ➔

astro.config.mjs Cheatsheet

An astro.config.mjs cheatsheet for Astro 7: site, base, trailingSlash, output, adapter, build, image, fonts, prefetch, redirects, i18n, env and markdown options.

Read ➔

Astro Content Collections API Cheatsheet

Astro content collections cheatsheet: defineCollection, glob() and file() loaders, Zod schemas, getCollection, getEntry, render, reference and live collections.

Read ➔

A Lightweight Astro Cookie Banner

A small Astro cookie banner that loads analytics only after consent: accept and decline buttons, choice saved in localStorage, and a link to change it later.

Read ➔

Astro Copy Code Button for Every Code Block

Add an Astro copy code button to every Markdown code block with one small script: no plugin, keyboard accessible, with a live status message for screen readers.

Read ➔

A CSS-Only Astro Carousel for Testimonials

Build an Astro carousel with CSS scroll snap: swipeable on touch, keyboard scrollable, and zero JavaScript. Optional prev/next buttons add a few lines of script.

Read ➔

Astro Directives Cheatsheet

All 16 Astro directives on one page: client:* hydration, server:defer, set:html, class:list, define:vars, is:inline, is:global and transition:*.

Read ➔

An Astro FAQ Section with FAQPage Schema

A reusable Astro FAQ component: questions from data, rendered as accessible details elements, with matching FAQPage schema JSON-LD generated from the same array.

Read ➔

The Astro Global: Every Property on One Page

The Astro global object explained: Astro.props, params, url, site, request, cookies, locals, slots, redirect, rewrite, session and more, with what each one returns.

Read ➔

The Astro Glossary: Every Term Explained

An Astro glossary of 50 terms: islands, hydration, adapters, integrations, content collections, loaders, server islands, actions and more.

Read ➔

Choosing a Headless CMS for Astro

How to choose an Astro CMS: when Markdown in Git is enough, Git-based vs API-based CMS options, how loaders connect them, and rebuilding on publish.

Read ➔

Astro Image and Picture Props Cheatsheet

Every Astro image prop on one page: Image and Picture props, layout values, widths, sizes, densities, priority, formats, getImage() and image config options.

Read ➔

An Astro Gallery with a Lightbox

A copy-paste Astro gallery: optimised thumbnails with the Image component, full-size versions from getImage(), and a lightbox on the native dialog element.

Read ➔

Astro Interview Questions for Developers

Astro interview questions with model answers, from basics to advanced: islands, directives, content collections, routing, SSR, performance and debugging.

Read ➔

Accessible Astro Mobile Menu Component

A copy-paste Astro mobile menu: a button with aria-expanded, a nav that hides on small screens, Escape to close, and under 1 KB of JavaScript. No framework needed.

Read ➔

An Astro Modal Built on the dialog Element

Build an Astro modal with the native dialog element: showModal() gives focus trapping, Escape to close and a backdrop for free. Copy-paste component and styles.

Read ➔

Astro Myths That Won't Die

Common Astro myths checked against Astro 7: static only, no interactivity, blogs only, needs React, can't scale. What's actually true now.

Read ➔

Plain Astro or Starlight for Your Docs?

Astro or Starlight for documentation? Starlight gives search, sidebar, i18n and accessible components out of the box; plain Astro suits docs inside a branded site.

Read ➔

A Reusable Astro Pagination Component

An Astro pagination component for paginate(): previous/next links, numbered pages with gaps, aria-current, and rel attributes. Works with any collection.

Read ➔

An Astro Pricing Table Component

A data-driven Astro pricing table: plans from a typed array, a highlighted plan, feature lists, an optional monthly/yearly toggle, and Product schema.

Read ➔

30 Astro Questions, Answered

Short, direct answers to 30 common Astro questions: what it is, cost, SEO, React, CMS, hosting, SSR, images, versions and themes, each linking to a deeper guide.

Read ➔

Astro Routing Cheatsheet

Astro routing cheatsheet: file-to-URL patterns, dynamic and rest params, getStaticPaths, paginate, endpoints, redirects, rewrites, 404 pages and route priority.

Read ➔

Astro SEO: The Complete Checklist

Astro SEO checklist with code: set site, build a reusable head component, add a sitemap, robots.txt, canonical URLs, JSON-LD, RSS, and make pages citable by AI.

Read ➔

Astro SSR: Server Rendering, When and How

Astro SSR explained: adapters, on-demand pages with prerender = false, server islands, actions, middleware and sessions in Astro 7, and when to stay static.

Read ➔

Accessible Astro Tabs Component

Copy-paste Astro tabs following the ARIA tabs pattern: tablist, tab and tabpanel roles, arrow keys, and server-rendered panels that work before JS loads.

Read ➔

Astro Template Syntax Cheatsheet

Astro syntax on one page: frontmatter, expressions, attributes, conditionals, loops, slots, fragments, dynamic tags, comments and how it differs from JSX.

Read ➔

Astro TypeScript Types Cheatsheet

The Astro types you'll use most: Props, HTMLAttributes, Polymorphic, ComponentProps, CollectionEntry, GetStaticPaths, APIRoute, ImageMetadata and App. Locals.

Read ➔

Astro vs Next.js: Which to Choose

Astro vs Next.js: Astro ships less JavaScript and suits content sites; Next.js suits React apps with heavy interactivity. A practical comparison and migration path.

Read ➔

The Best Astro Themes in 2026

The best Astro themes in 2026: free picks like AstroWind, AstroPaper and Starlight, plus paid Komal themes by site type, and what to check before you choose.

Read ➔

Deploying Astro: Every Major Host Compared

How to deploy Astro: run npm run build, publish dist/ to Cloudflare Pages, Netlify, Vercel or GitHub Pages. Settings, adapters, env vars and domains compared.

Read ➔

Astro Image vs Picture vs a Plain img Tag

Astro Image vs Picture vs img: use Image for most local images, Picture when you want AVIF with a WebP fallback, and img for CMS-CDN, SVG or public files.

Read ➔

Starlight Frontmatter Cheatsheet

Every Starlight frontmatter field: title, description, template, hero, banner, sidebar label, order and badge, tableOfContents, prev/next, pagefind, draft and more.

Read ➔

Astro Theme, Starter or Blank Project?

Astro starter, theme or blank project? Choose by how close the result is to what you need, how much you'll change, and whether you're learning or shipping.

Read ➔

Web Performance Glossary for Site Builders

A web performance glossary in plain language: Core Web Vitals, LCP, INP, CLS, TTFB, preload, lazy loading, CDN and cache, with fixes for each.

Read ➔

Which Client Directive Should I Use in Astro?

Which client directive for an Astro island? None, client:visible, client:idle, client:load, client:media or client:only: a quick decision flow with examples.

Read ➔