Skip to content
Merged
17 changes: 17 additions & 0 deletions apps/website/pages/components/footer/code.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Head from "next/head";
import type { ReactElement } from "react";
import FooterPageLayout from "screens/components/footer/FooterPageLayout";
import FooterCodePage from "screens/components/footer/code/FooterCodePage";

const Code = () => (
<>
<Head>
<title>Footer code — Halstack Design System</title>
</Head>
<FooterCodePage />
</>
);

Code.getLayout = (page: ReactElement) => <FooterPageLayout>{page}</FooterPageLayout>;

export default Code;
24 changes: 10 additions & 14 deletions apps/website/pages/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import Head from "next/head";
import type { ReactElement } from "react";
import FooterPageLayout from "screens/components/footer/FooterPageLayout";
import FooterCodePage from "screens/components/footer/code/FooterCodePage";
import FooterOverviewPage from "screens/components/footer/overview/FooterOverviewPage";

const Index = () => {
return (
<>
<Head>
<title>Footer — Halstack Design System</title>
</Head>
<FooterCodePage></FooterCodePage>
</>
);
};
const Index = () => (
<>
<Head>
<title>Footer — Halstack Design System</title>
</Head>
<FooterOverviewPage />
</>
);

Index.getLayout = function getLayout(page: ReactElement) {
return <FooterPageLayout>{page}</FooterPageLayout>;
};
Index.getLayout = (page: ReactElement) => <FooterPageLayout>{page}</FooterPageLayout>;

export default Index;
21 changes: 0 additions & 21 deletions apps/website/pages/components/footer/specifications.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions apps/website/pages/components/footer/usage.tsx

This file was deleted.

14 changes: 5 additions & 9 deletions apps/website/screens/components/footer/FooterPageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import { ReactNode } from "react";

const FooterPageHeading = ({ children }: { children: ReactNode }) => {
const tabs = [
{ label: "Code", path: "/components/footer" },
{ label: "Usage", path: "/components/footer/usage" },
{ label: "Specifications", path: "/components/footer/specifications" },
{ label: "Overview", path: "/components/footer" },
{ label: "Code", path: "/components/footer/code" },
];

return (
Expand All @@ -18,11 +17,8 @@ const FooterPageHeading = ({ children }: { children: ReactNode }) => {
<DxcFlex direction="column" gap="var(--spacing-gap-xl)">
<ComponentHeading name="Footer" />
<DxcParagraph>
Footers are a secondary element in a web page because they usually appear at the bottom and it is the last
thing that the user interacts with. But the presence of the footer must be designed in every application and
be part of it (consumer or back-office) as it is a key layout element to the overall experience. It is a
choice of the designer to either leave the footer visible by default or push it down, depending on the use
case.
The footer is a UI component placed at the bottom of the page, providing informational context, secondary
navigation, and legal or support links.
</DxcParagraph>
<DxcParagraph>
The footer is part of the application layout, so it can only be used inside of it. Please check the{" "}
Expand All @@ -31,7 +27,7 @@ const FooterPageHeading = ({ children }: { children: ReactNode }) => {
</Link>{" "}
documentation.
</DxcParagraph>
<TabsPageHeading tabs={tabs}></TabsPageHeading>
<TabsPageHeading tabs={tabs} />
</DxcFlex>
</PageHeading>
{children}
Expand Down
113 changes: 69 additions & 44 deletions apps/website/screens/components/footer/code/FooterCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import QuickNavContainer from "@/common/QuickNavContainer";
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
import DocFooter from "@/common/DocFooter";
import StatusBadge from "@/common/StatusBadge";
import Code, { TableCode } from "@/common/Code";
import Code, { ExtendedTableCode, TableCode } from "@/common/Code";

const logoTypeString = `{
href?: string;
src: string;
title?: string;
}`;

const sections = [
{
Expand All @@ -19,6 +25,68 @@ const sections = [
</tr>
</thead>
<tbody>
<tr>
<td>bottomLinks</td>
<td>
<TableCode>{"{ href: string; text: string; }[]"}</TableCode>
</td>
<td>
An array of objects representing the links that will be rendered at the bottom part of the footer. Each
object has the following properties:
<ul>
<li>
<b>text</b>: Text for the link.
</li>
<li>
<b>href</b>: URL of the page the link goes to.
</li>
</ul>
</td>
<td>-</td>
</tr>
<tr>
<td>children</td>
<td>
<TableCode>React.ReactNode</TableCode>
</td>
<td>The center section of the footer. Can be used to render custom content in this area.</td>
<td>-</td>
</tr>
<tr>
<td>copyright</td>
<td>
<TableCode>string</TableCode>
</td>
<td>The text that will be displayed as copyright disclaimer.</td>
<td>-</td>
</tr>
<tr>
<td>
<DxcFlex direction="column" gap="var(--spacing-gap-xs)" alignItems="baseline">
<StatusBadge status="new" />
logo
</DxcFlex>
</td>
<td>
<td>
<TableCode>{"Logo"}</TableCode>
<p>
being <Code>Logo</Code> an object with the following properties:
</p>
<ExtendedTableCode>{logoTypeString}</ExtendedTableCode>
</td>
</td>
<td>Logo to be displayed inside the header.</td>
<td>-</td>
</tr>
<tr>
<td>margin</td>
<td>
<TableCode>'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge'</TableCode>
</td>
<td>Size of the top margin to be applied to the footer.</td>
<td>-</td>
</tr>
<tr>
<td>
<DxcFlex direction="column" gap="var(--spacing-gap-xs)" alignItems="baseline">
Expand Down Expand Up @@ -75,49 +143,6 @@ const sections = [
</td>
<td>-</td>
</tr>
<tr>
<td>bottomLinks</td>
<td>
<TableCode>{"{ href: string; text: string; }[]"}</TableCode>
</td>
<td>
An array of objects representing the links that will be rendered at the bottom part of the footer. Each
object has the following properties:
<ul>
<li>
<b>text</b>: Text for the link.
</li>
<li>
<b>href</b>: URL of the page the link goes to.
</li>
</ul>
</td>
<td>-</td>
</tr>
<tr>
<td>copyright</td>
<td>
<TableCode>string</TableCode>
</td>
<td>The text that will be displayed as copyright disclaimer.</td>
<td>-</td>
</tr>
<tr>
<td>children</td>
<td>
<TableCode>React.ReactNode</TableCode>
</td>
<td>The center section of the footer. Can be used to render custom content in this area.</td>
<td>-</td>
</tr>
<tr>
<td>margin</td>
<td>
<TableCode>'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge'</TableCode>
</td>
<td>Size of the top margin to be applied to the footer.</td>
<td>-</td>
</tr>
<tr>
<td>tabIndex</td>
<td>
Expand Down
131 changes: 131 additions & 0 deletions apps/website/screens/components/footer/overview/FooterOverviewPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
import { DxcBulletedList, DxcFlex, DxcParagraph } from "@dxc-technology/halstack-react";
import DocFooter from "@/common/DocFooter";
import QuickNavContainer from "@/common/QuickNavContainer";
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
import anatomy from "./images/footer_anatomy.png";
import variants from "./images/footer_variants.png";
import Image from "@/common/Image";
import Figure from "@/common/Figure";

const sections = [
{
title: "Introduction",
content: (
<DxcParagraph>
The footer is used as the final section of a page to display utility elements such as legal disclaimers,
secondary links, copyright information, or the brand logo. Its purpose is to reinforce brand identity and
provide consistent access across digital experiences without disrupting the main user flow.
</DxcParagraph>
),
},
{
title: "Anatomy",
content: (
<>
<Image src={anatomy} alt="Footer's anatomy" />
<DxcBulletedList type="number">
<DxcBulletedList.Item>
<strong>Container:</strong> The outer wrapper that defines the overall layout, padding, and alignment of all
footer content. Ensures consistency across screen sizes.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Logo:</strong> Represents the brand identity visually. Positioned on the left side, it helps
reinforce company recognition across all pages.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Social icons:</strong> A set of clickable icons linking to the company’s social media platforms
(e.g., LinkedIn, Facebook). Placed on the right side for easy visibility and access.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Copyright:</strong> Text displaying legal ownership of the content. Ensures users know the site is
officially owned.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Company links:</strong> A horizontal list of navigational hyperlinks such as Privacy Policy, Terms &
Conditions, etc. Offers users access to important legal or informational resources.
</DxcBulletedList.Item>
</DxcBulletedList>
</>
),
},
{
title: "Variants",
content: (
<>
<DxcParagraph>
To maintain consistency in layout flexibility and brand presentation, the footer offers three primary
variants: <strong>Default</strong>, <strong>With Navigation</strong>, and <strong>Small</strong>.
</DxcParagraph>
<DxcBulletedList>
<DxcBulletedList.Item>
<strong>Default:</strong> provides a balanced layout with branding and essential legal links. It offers a
clean, uncluttered appearance suitable for most standard applications.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>With Navigation:</strong> includes additional navigational sections, enabling users to quickly
access key areas of the site. This layout is ideal for content-heavy pages or enterprise-level applications
requiring enhanced footer functionality.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Small:</strong> offers a compact version of the footer, typically limited to branding and minimal
legal text. It's best suited for lightweight experiences, login pages, or environments with constrained
vertical space.
</DxcBulletedList.Item>
</DxcBulletedList>
<Figure caption="Footer variants">
<Image src={variants} alt="Application layout design specifications" />
</Figure>
<DxcParagraph>
Choosing between these variants helps tailor the footer to a wide range of contexts, whether prioritizing
simplicity, providing extended navigation, or optimizing for space efficiency.
</DxcParagraph>
</>
),
},
{
title: "Best practices",
content: (
<>
<DxcBulletedList>
<DxcBulletedList.Item>
<strong>Dock the footer to the bottom of the page:</strong> the footer should remain fixed at the bottom
edge of the viewport and not scroll with the page content to maintain visibility and separation from dynamic
areas.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Ensure full-width alignment:</strong> the footer container should always span the full width of the
screen to create a clean, structured boundary and support responsive behavior across breakpoints.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Display copyright information on the right:</strong> consistently place legal disclaimers or
copyright text aligned to the right edge of the footer to support predictable user expectations.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Use a simplified or alternate logo:</strong> consider using a smaller or alternative version of the
brand logo (isotype, imagotype, or monochrome variant) rather than duplicating the main header image to
reduce visual redundancy.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Limit the number of links:</strong> include only the most essential company links (e.g., Terms,
Privacy, Accessibility) to avoid overwhelming users with excessive options.
</DxcBulletedList.Item>
<DxcBulletedList.Item>
<strong>Select the most appropriate variant for context:</strong> choose the footer variant that best fits
the content density and user goals of the page.
</DxcBulletedList.Item>
</DxcBulletedList>
</>
),
},
];

const FooterOverviewPage = () => (
<DxcFlex direction="column" gap="4rem">
<QuickNavContainerLayout>
<QuickNavContainer sections={sections} startHeadingLevel={2} />
</QuickNavContainerLayout>
<DocFooter githubLink="https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/components/footer/overview/FooterOverviewPage.tsx" />
</DxcFlex>
);

export default FooterOverviewPage;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading