Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Astro landing page starter with gradient background, responsive hamburger/dropdown menu, and switchable floating/fullscreen headers.
Base Astro is a free starter template for building landing pages with the Astro framework, centered on a configurable header with responsive hamburger and multi-level dropdown menus plus a gradient background. It is published by SofiDevO on GitHub and is intended to be a clean base for any new landing page project.
Base Astro is a minimal landing page starter built on Astro, the static site generator that ships zero JavaScript by default. The template takes a JavaScript configuration file for navigation items and produces a static site with a gradient background, a responsive header that switches between floating and fullscreen styles, and hamburger/dropdown menus for mobile. It includes a Layout component, a LayoutNoHeader variant, an index page, a 404 page, and an atomic design file structure with atoms such as Button, GradientBg, Logo, and Title. All components are written with TypeScript interfaces for better type safety, while the navigation data is stored as plain JavaScript in menuItems.data.js.
headerType prop on Layout, Layout.astro, or the Header component directly.src/components/header/nav-menu/menuItems.data.js with a submenu array on any item.MobileNav.astro component for mobile navigation.GradientBg atom component and global styles in src/styles/global.css.index.astro and add your own sections while keeping the provided header, footer, and gradient background.menuItems.data.js without touching component code.404.astro and supports additional routes by adding files to src/pages.npm create astro@latest -- --template SofiDevO/base-astro.npm install.npm run dev.src/components/header/nav-menu/menuItems.data.js to change menu links, text, and nested submenus.headerType="fullscreen" or headerType="floating" on Layout.Edit the array in src/components/header/nav-menu/menuItems.data.js. Each menu item requires a link and a text property; add a submenu array to create a dropdown, and nest further submenu arrays for multi-level menus.
The floating header has 16px container padding, a max width of 1100px, and an 18px border radius. The fullscreen header has zero padding, spans the full page width, and has no border radius.
Yes, all components include TypeScript interfaces for development experience and type safety, though the menu data file is plain JavaScript.
In your menu data, give a menu item a submenu property containing an array of items. Each item can itself have a submenu, allowing unlimited nesting, as shown in the "Products" example with Software and Hardware subcategories.
The template is publicly available on GitHub and can be scaffolded directly using the Astro create command, so it is free to use as a starting point for your own projects.
