--- status: "published" label: "Marketing Components" title: "Marketing Components in the Next.js Supabase SaaS kit" description: "Learn how to use the Marketing components in the Next.js Supabase SaaS kit" order: 8 --- Marketing components are designed to help you create beautiful and engaging marketing pages for your SaaS application. These components are built on top of the Shadcn UI library and are designed to work seamlessly with Next.js routing. ## Hero The Hero component is a versatile and customizable landing page hero section for React applications. {% component path="marketing/hero" /%} ### Import ```jsx import { Hero } from '@kit/ui/marketing'; ``` ### Usage ```jsx import { Hero, Pill, CtaButton } from '@kit/ui/marketing'; import Image from 'next/image'; function LandingPage() { return ( New Feature} title="Welcome to Our App" subtitle="Discover the power of our innovative solution" cta={Get Started} image={ Hero Image } /> ); } ``` ### Styling The Hero component uses Tailwind CSS for styling. You can customize its appearance by: 1. Modifying the default classes in the component. 2. Passing additional classes via the `className` prop. 3. Overriding styles in your CSS using the appropriate selectors. ### Animations By default, the Hero component applies entrance animations to its elements. You can disable these animations by setting the `animate` prop to `false`. ### Accessibility The Hero component uses semantic HTML elements and follows accessibility best practices: - The main title uses an `

` tag (via the `HeroTitle` component). - The subtitle uses an `

` tag for proper heading hierarchy. Ensure that any images passed via the `image` prop include appropriate `alt` text for screen readers. ### Notes - The Hero component is designed to be flexible and can accommodate various content types through its props. - For optimal performance, consider lazy-loading large images passed to the `image` prop. - The component is responsive and adjusts its layout for different screen sizes. ### A Larger example straight from the kit Below is a larger example of a Hero component with additional elements like a pill, CTA button, and image: ```tsx import { Hero, Pill, CtaButton, GradientSecondaryText } from '@kit/ui/marketing'; import { Trans } from '@kit/ui/trans'; import { LayoutDashboard } from 'lucide-react'; import Image from 'next/image'; The leading SaaS Starter Kit for ambitious developers } title={ <> The ultimate SaaS Starter for your next project } subtitle={ Build and Ship a SaaS faster than ever before with the next-gen SaaS Starter Kit. Ship your SaaS in days, not months. } cta={} image={ {`App } /> function MainCallToActionButton() { return (
); } ``` ## HeroTitle The `HeroTitle` component is a specialized heading component used within the Hero component to display the main title. {% component path="marketing/hero-title" /%} ### Props The `HeroTitle` component accepts the following props: 1. `asChild?: boolean`: Whether to render the component as a child of the `Slot` component. 2. `HTMLAttributes`: Additional attributes to apply to the heading element. ### Usage ```tsx import { HeroTitle } from '@kit/ui/marketing'; function LandingPage() { return ( Welcome to Our App ); } ``` ## Pill The `Pill` component is a small, rounded content container often used for highlighting or categorizing information. {% component path="marketing/pill" /%} ### Usage Use the `Pill` component to create a small, rounded content container with optional label text. ```tsx import { Pill } from '@kit/ui/marketing'; function LandingPage() { return ( Discover the power of our innovative ); } ``` ## Features The `FeatureShowcase`, `FeatureShowcaseIconContainer`, `FeatureGrid`, and `FeatureCard` components are designed to showcase product features on marketing pages. ### FeatureShowcase The `FeatureShowcase` component is a layout component that showcases a feature with an icon, heading, and description. ### FeatureShowcaseIconContainer The `FeatureShowcaseIconContainer` component is a layout component that contains an icon for the `FeatureShowcase` component. ### FeatureGrid The `FeatureGrid` component is a layout component that arranges `FeatureCard` components in a grid layout. ### FeatureCard The `FeatureCard` component is a card component that displays a feature with a label, description, and optional image. ### Usage Use the `FeatureShowcase` component to showcase a feature with an icon, heading, and description. ```tsx
The ultimate SaaS Starter Kit .{' '} Unleash your creativity and build your SaaS faster than ever with Makerkit. } icon={ All-in-one solution } > {'Dashboard {'Sign {'Multi {'Billing'}
``` ## SecondaryHero The `SecondaryHero` component is a secondary hero section that can be used to highlight additional features or content on a landing page. ```tsx Get started for free. No credit card required.} heading="Fair pricing for all types of businesses" subheading="Get started on our free plan and upgrade when you are ready." /> ``` {% component path="marketing/secondary-hero" /%} ## Header The `Header` component is a navigation header that can be used to display links to different sections of a marketing page. ```tsx export function SiteHeader(props: { user?: User | null }) { return (
} navigation={} actions={} /> ); } ``` ## Footer The `Footer` component is a footer section that can be used to display links, social media icons, and other information on a marketing page. ```tsx import { Footer } from '@kit/ui/marketing'; import { Trans } from '@kit/ui/trans'; import { AppLogo } from '~/components/app-logo'; import appConfig from '~/config/app.config'; export function SiteFooter() { return (