Skip to main content
Version: 1.0.0

Footer Component

The Footer component is a comprehensive and customizable footer for your Next.js application. It includes sections for the company logo, copyright information, various links, and social media icons.

Importing the Component

To use the Footer component in your Next.js application, import it as follows:

import { Footer } from '@/components/Footer';

Basic Usage

Here's a basic example of how to use the Footer component:

import { Footer } from '@/components/Footer';

const Layout = ({ children }) => {
return (
<div>
{children}
<Footer />
</div>
);
};

Functionality

The Footer component provides the following functionality:

  1. Displays the company logo and name.
  2. Shows a tagline and "Built With" information.
  3. Includes a copyright notice with the current year.
  4. Provides links to various pages grouped into "Links" and "Legal" sections.
  5. Displays social media icons with links to Discord, Twitter (X), and YouTube.
  6. Uses responsive design for different screen sizes.

Dependencies

This component relies on the following:

  • Next.js (for routing and Link component)
  • react-icons (for social media icons)
  • A custom Logo component
  • A custom BuiltWith component
  • SiteConfig for site-specific information
  • Routes object for page URLs

Customization

To customize the Footer component:

  1. Modify the SiteConfig object to update the site name and social media links.
  2. Update the Routes object to change the URLs for different pages.
  3. Modify the Tailwind CSS classes to adjust the styling.
  4. Replace the Logo and BuiltWith components with your own implementations.
  5. Add or remove links in the "Links" and "Legal" sections as needed.
  6. Customize the tagline "Start making money today" to match your site's purpose.

Styling

The component uses Tailwind CSS for styling. Key styling features include:

  • Responsive layout using flexbox, switching from column to row layout on medium screens and above.
  • Custom text sizes and weights for different elements.
  • Hover effects on links and social media icons.
  • Use of text-muted-foreground for less prominent text.

Accessibility

To ensure accessibility:

  1. All links have descriptive text or title attributes for screen readers.
  2. Social media icons use title attributes to describe their purpose.
  3. The component structure uses semantic HTML with a <footer> tag.

Best Practices and Improvements

  1. Consider making the links and social media information configurable through props or a configuration file.
  2. Implement internationalization (i18n) for multi-language support.
  3. Add aria-labels to icon-only links for better accessibility.
  4. Consider adding a newsletter signup form or additional interactive elements.

Example Usage in a Layout

Here's an example of how you might use the Footer component in a layout:

import { Footer } from '@/components/Footer';
import { Header } from '@/components/Header';

const Layout = ({ children }) => {
return (
<div className='flex flex-col min-h-screen'>
<Header />
<main className='flex-grow'>{children}</main>
<Footer />
</div>
);
};

export default Layout;

This example demonstrates how to use the Footer component within a layout, ensuring it appears at the bottom of every page that uses this layout.


By using the Footer component, you can easily add a comprehensive and customizable footer to your Next.js application. Remember to update the content, links, and styling to match your specific brand and design requirements.