diff --git a/src/components/landing/Navbar.tsx b/src/components/landing/Navbar.tsx
index 5bdd115..81f636e 100644
--- a/src/components/landing/Navbar.tsx
+++ b/src/components/landing/Navbar.tsx
@@ -2,6 +2,13 @@ import { Link } from 'react-router-dom';
import { useState } from 'react';
import { Menu, X } from 'lucide-react';
+const SECTIONS = [
+ { label: 'Features', hash: 'features' },
+ { label: 'How It Works', hash: 'how-it-works' },
+ { label: 'Pricing', hash: 'pricing' },
+ { label: 'Contact', hash: 'contact' },
+];
+
export default function Navbar() {
const [open, setOpen] = useState(false);
return (
@@ -18,9 +25,9 @@ export default function Navbar() {
{/* Desktop nav */}
- {['Features', 'Use Cases', 'Pricing', 'Docs', 'Security', 'Contact'].map((item) => (
-
{item}
+ {SECTIONS.map(({ label, hash }) => (
+
{label}
))}
@@ -42,9 +49,9 @@ export default function Navbar() {
{open && (
- {['Features', 'Use Cases', 'Pricing', 'Docs', 'Security', 'Contact'].map((item) => (
-
setOpen(false)}>{item}
+ {SECTIONS.map(({ label, hash }) => (
+
setOpen(false)}>{label}
))}
Log in
diff --git a/src/index.css b/src/index.css
index 9f1b022..c8107ec 100644
--- a/src/index.css
+++ b/src/index.css
@@ -2,6 +2,12 @@
@tailwind components;
@tailwind utilities;
+html {
+ scroll-behavior: smooth;
+ /* offset for the fixed navbar (h-16 = 4rem) so anchor targets aren't hidden underneath it */
+ scroll-padding-top: 4rem;
+}
+
@layer base {
body {
@apply bg-white text-gray-900 antialiased;
diff --git a/src/pages/Landing.tsx b/src/pages/Landing.tsx
index 98ce336..d1b8023 100644
--- a/src/pages/Landing.tsx
+++ b/src/pages/Landing.tsx
@@ -33,7 +33,7 @@ export default function Landing() {
{/* Footer */}
-