diff --git a/apps/website/pages/components/accordion/code.tsx b/apps/website/pages/components/accordion/code.tsx
new file mode 100644
index 0000000000..5d11b6205a
--- /dev/null
+++ b/apps/website/pages/components/accordion/code.tsx
@@ -0,0 +1,17 @@
+import Head from "next/head";
+import type { ReactElement } from "react";
+import AccordionPageLayout from "screens/components/accordion/AccordionPageLayout";
+import AccordionCodePage from "screens/components/accordion/code/AccordionCodePage";
+
+const Code = () => (
+ <>
+
+ Accordion code — Halstack Design System
+
+
+ >
+);
+
+Code.getLayout = (page: ReactElement) => {page};
+
+export default Code;
diff --git a/apps/website/pages/components/accordion/index.tsx b/apps/website/pages/components/accordion/index.tsx
index d865a8a8f8..8f6d902d48 100644
--- a/apps/website/pages/components/accordion/index.tsx
+++ b/apps/website/pages/components/accordion/index.tsx
@@ -1,21 +1,17 @@
import Head from "next/head";
import type { ReactElement } from "react";
import AccordionPageLayout from "screens/components/accordion/AccordionPageLayout";
-import AccordionCodePage from "screens/components/accordion/code/AccordionCodePage";
+import AccordionOverviewPage from "screens/components/accordion/overview/AccordionOverviewPage";
-const Index = () => {
- return (
- <>
-
- Accordion — Halstack Design System
-
-
- >
- );
-};
+const Index = () => (
+ <>
+
+ Accordion — Halstack Design System
+
+
+ >
+);
-Index.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
+Index.getLayout = (page: ReactElement) => {page};
export default Index;
diff --git a/apps/website/pages/components/accordion/specifications.tsx b/apps/website/pages/components/accordion/specifications.tsx
deleted file mode 100644
index 595b36f672..0000000000
--- a/apps/website/pages/components/accordion/specifications.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import Head from "next/head";
-import type { ReactElement } from "react";
-import AccordionPageLayout from "screens/components/accordion/AccordionPageLayout";
-import AccordionSpecsPage from "screens/components/accordion/specs/AccordionSpecsPage";
-
-const Specifications = () => {
- return (
- <>
-
- Accordion Specs — Halstack Design System
-
-
- >
- );
-};
-
-Specifications.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
-
-export default Specifications;
diff --git a/apps/website/pages/components/accordion/usage.tsx b/apps/website/pages/components/accordion/usage.tsx
deleted file mode 100644
index 2fe0b67f24..0000000000
--- a/apps/website/pages/components/accordion/usage.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import Head from "next/head";
-import type { ReactElement } from "react";
-import AccordionPageLayout from "screens/components/accordion/AccordionPageLayout";
-import AccordionUsagePage from "screens/components/accordion/usage/AccordionUsagePage";
-
-const Usage = () => {
- return (
- <>
-
- Accordion Usage — Halstack Design System
-
-
- >
- );
-};
-
-Usage.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
-
-export default Usage;
diff --git a/apps/website/screens/components/accordion/AccordionPageLayout.tsx b/apps/website/screens/components/accordion/AccordionPageLayout.tsx
index 33e4d86743..9cb36985ef 100644
--- a/apps/website/screens/components/accordion/AccordionPageLayout.tsx
+++ b/apps/website/screens/components/accordion/AccordionPageLayout.tsx
@@ -6,9 +6,8 @@ import { ReactNode } from "react";
const AccordionPageHeading = ({ children }: { children: ReactNode }) => {
const tabs = [
- { label: "Code", path: "/components/accordion" },
- { label: "Usage", path: "/components/accordion/usage" },
- { label: "Specifications", path: "/components/accordion/specifications" },
+ { label: "Overview", path: "/components/accordion" },
+ { label: "Code", path: "/components/accordion/code" },
];
return (
@@ -22,7 +21,7 @@ const AccordionPageHeading = ({ children }: { children: ReactNode }) => {
enhances the user experience by organizing information into smaller, digestible chunks, helping reduce
cognitive load and save screen space.
-
+
{children}
diff --git a/apps/website/screens/components/accordion/code/AccordionCodePage.tsx b/apps/website/screens/components/accordion/code/AccordionCodePage.tsx
index c70438f61b..1e775ee1bc 100644
--- a/apps/website/screens/components/accordion/code/AccordionCodePage.tsx
+++ b/apps/website/screens/components/accordion/code/AccordionCodePage.tsx
@@ -28,17 +28,17 @@ const sections = [
-
independent
-
- boolean
-
- When true, limits the user to single-open section at a time. When false, multiple sections can be opened
- simultaneously.
+
+
+ children
+
- false
+ {`ReactElement[] | ReactElement`}
+
Contains one or more accordion items.
+
-
defaultIndexActive
@@ -52,25 +52,27 @@ const sections = [
-
-
indexActive
+
independent
- number | number[]
+ boolean
- The index of the active accordion. If undefined, the component will be uncontrolled and the active
- accordion will be managed internally by the component. If null, the component will be controlled and all
- accordions will be closed. If the accordion is not independent, several accordions can be activated.
+ When true, limits the user to single-open section at a time. When false, multiple sections can be opened
+ simultaneously.
+
+
+ false
-
-
-
onActiveChange
+
indexActive
- {`(index: number | number[]) => void`}
+ number | number[]
- This function will be called when the user clicks on an accordion. The index of the clicked accordion will
- be passed as a parameter.
+ The index of the active accordion. If undefined, the component will be uncontrolled and the active
+ accordion will be managed internally by the component. If null, the component will be controlled and all
+ accordions will be closed. If the accordion is not independent, several accordions can be activated.
-
@@ -86,16 +88,14 @@ const sections = [
-
+
onActiveChange
-
-
- children
-
+ {`(index: number | number[]) => void`}
- {`ReactElement[] | ReactElement`}
+ This function will be called when the user clicks on an accordion. The index of the clicked accordion will
+ be passed as a parameter.
-
Contains one or more accordion items.
-
@@ -120,56 +120,48 @@ const sections = [
-
-
-
- label
-
-
+
assistiveText
string
-
The panel label.
+
Assistive text to be placed on the right side of the panel.
Badge component to add extra value to the accordion.
+
The expanded panel of the accordion. This area can be used to render custom content.
-
+
disabled
-
-
- statusLight
-
+ boolean
+
If true, the component will be disabled.
- React.ReactNode
+ false
-
Status light component to add extra value to the accordion.
-
-
icon
@@ -187,34 +179,42 @@ const sections = [
-
-
assistiveText
+
+
+
+ label
+
+
string
-
Assistive text to be placed on the right side of the panel.
+
The panel label.
-
-
disabled
- boolean
+
+
+ statusLight
+
-
If true, the component will be disabled.
- false
+ React.ReactNode
+
Status light component to add extra value to the accordion.
+
-
-
- children
+
+ subLabel
- React.ReactNode
+ string
-
The expanded panel of the accordion. This area can be used to render custom content.
+
Additional info label positioned under the label.
-
diff --git a/apps/website/screens/components/accordion/overview/AccordionOverviewPage.tsx b/apps/website/screens/components/accordion/overview/AccordionOverviewPage.tsx
new file mode 100644
index 0000000000..6a7f8ea18a
--- /dev/null
+++ b/apps/website/screens/components/accordion/overview/AccordionOverviewPage.tsx
@@ -0,0 +1,319 @@
+import { DxcBulletedList, DxcFlex, DxcParagraph } from "@dxc-technology/halstack-react";
+import QuickNavContainer from "@/common/QuickNavContainer";
+import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
+import DocFooter from "@/common/DocFooter";
+import Image from "@/common/Image";
+import anatomy from "./images/accordion_anatomy.png";
+import Example from "@/common/example/Example";
+import basicExample from "./examples/basicExample";
+import nestedExample from "./examples/nestedExample";
+import placement from "./images/accordion_placement.png";
+
+const sections = [
+ {
+ title: "Introduction",
+ content: (
+
+ The accordion component is designed to present large amounts of content in a small space by leveraging
+ progressive disclosure. It helps improve the user experience by breaking down information into manageable
+ sections, allowing users to focus only on what they need.
+
+ ),
+ },
+ {
+ title: "Anatomy",
+ content: (
+ <>
+
+
+
+ Header: serves as the trigger for expanding or collapsing the section. It acts as a summary
+ of the content, allowing users to decide if they want to interact with it.
+
+
+ Content area: the expanded section where detailed information or functionality resides.
+
+
+ Title: a concise and descriptive label that summarizes the content of the accordion
+ section. It helps users understand what type of information they can expect to find inside.
+
+
+ Chevron icon(Expand/collapse): A visual indicator of the accordion's current state
+ (expanded or collapsed). It provides an affordance for interaction and ensures users can toggle the
+ accordion intuitively.
+
+
+ Left secondary element(Optional): Provides additional context or enhances the
+ user experience. Only one of the following can be used per accordion section to avoid
+ visual clutter:
+
+
+ Icon: Adds visual context or aids recognition by representing the content type or
+ purpose of the section.
+
+
+ Badge: Displays supplemental information, such as a notification count or status, to
+ give users a quick overview of the section.
+
+
+
+
+ Sublabel(Optional): Offers additional context or instruction.
+
+
+ Right secondary element(Optional): Also limited to one element
+ per section. May include:
+
+
+ Helper text: Offers supporting guidance or content summary.
+
+
+ Status light: A visual status indicator (e.g., completed, in progress, error).
+
+
+ Badge: Similar to the left badge, positioned right for layout flexibility.
+
+
+
+
+
+ >
+ ),
+ },
+ {
+ title: "Using accordions",
+ subSections: [
+ {
+ title: "Behavior and interaction",
+ content: (
+
+ The accordion component has two main states: collapsed and expanded. The chevron icon at the end of the
+ accordion indicates which state the accordion is in. Accordions begin by default in the collapsed state with
+ all content panels closed. Starting in a collapsed state gives the user a high level overview of the
+ available information.
+
+ ),
+ },
+ {
+ title: "Content area",
+ content: (
+ <>
+
+ The content area can contain other components, images, tables, and every custom feature that can be
+ supported inside the element container.
+
+
+ >
+ ),
+ },
+ {
+ title: "Allowing multiple sections open vs single-open behavior",
+ content: (
+ <>
+
+ The accordion component can be configured to allow either multiple sections to be open
+ simultaneously or limit the user to a single-open section at a time. Each approach has
+ specific use cases, but it's important to prioritise user needs and content hierarchy when deciding which
+ behavior to implement.
+
+
+
+ Allow multiple sections open
+
+ This approach gives users full control over the visibility of content, allowing them to open or
+ collapse multiple sections at the same time. It's particularly useful when:
+
+
+
+ Users need to compare or reference information across different sections simultaneously.
+
+
+ The content in each section is independent and doesn't require strict linear navigation.
+
+
+ There is enough vertical space to accommodate multiple expanded sections without overwhelming the
+ layout.
+
+
+
+
+ Single-open behavior
+
+ Some implementations restrict the accordion to allow only one section to be open at a time. When a
+ user expands a new section, the previously expanded section collapses automatically. This pattern is
+ suitable when:
+
+
+
+ The content is closely related or mutually exclusive, making it logical to view only one section at
+ a time.
+
+
+ Vertical space is limited, and having multiple sections open could cause usability or layout issues.
+
+
+ A simplified and more guided user experience is desired, such as in wizards or step-by-step
+ processes.
+
+
+
+
+ >
+ ),
+ },
+ {
+ title: "Placement and alignment",
+ content: (
+ <>
+
+ Accordions can be placed with main page content or placed inside of a container such as a side panel or
+ tile.
+
+
+ >
+ ),
+ },
+ {
+ title: "Mobile",
+ content: (
+ <>
+
+ In small devices, extremely long pages are detrimental to the user experience. Collapsing information
+ minimises excessive scrolling and gives an overview of the structure and content available on the page.
+
+
+ In mobile use 100% of the available screen width
+
+ >
+ ),
+ },
+ {
+ title: "Best practices",
+ content: (
+
+ To ensure a clean, efficient, and user-friendly experience, follow these best practices when designing and
+ implementing accordion components:
+
+ ),
+ subSections: [
+ {
+ title: "Use accordions to manage space and structure",
+ content: (
+
+
+ Apply accordions when you need to organize large or secondary content into collapsible sections.
+
+
+ They are particularly useful for FAQs, optional content, or detailed information nested under
+ high-level summaries.
+
+
+ Collapsing content helps reduce scrolling and offers users control over what they choose to engage
+ with.
+
+
+ ),
+ },
+ {
+ title: "Keep headers simple and informative",
+ content: (
+
+
+ Each accordion header must include a clear, concise title that describes the content inside.
+
+
+ Use a sublabel only when additional context is necessary —it should not overpower the title.
+
+
+ Avoid hiding essential or primary information inside an accordion panel.
+
+
+ ),
+ },
+ {
+ title: "Limit secondary elements for clarity",
+ content: (
+
+
+ Use only one secondary element per side of the header (left and right) to avoid
+ clutter.
+
+
+ Choose either an icon or a badge for the left side, and a helper text, badge, or status light for the
+ right side —never more than one per side.
+
+
+ Avoid placing two elements of the same type in one header (e.g., two badges), as this reduces
+ scannability and can confuse users.
+
+
+ ),
+ },
+ {
+ title: "Respect visual hierarchy and semantic meaning",
+ content: (
+
+
+ Always prioritize the visibility of mandatory elements like the title over optional elements.
+
+
+ If both a badge and a status light are present, avoid applying semantic colors (e.g., red, green) to
+ the badge to prevent visual conflict with the status indicator.
+
+
+ Maintain consistency in layout and alignment to support content scanning, especially when multiple
+ accordion sections are used together.
+
+
+ ),
+ },
+ {
+ title: "Choose the appropriate expand behavior",
+ content: (
+
+
+ Use single-open behavior when content is interdependent, linear, or when space is
+ limited.
+
+
+ Use multi-open behavior when content is independent or when users may need to view
+ multiple sections at once.
+
+
+ Consider the context of use and user goals when deciding which interaction pattern is most
+ appropriate.
+
+
+ ),
+ },
+ {
+ title: "Design for mobile and accessibility",
+ content: (
+
+
+ Accordions should span the full width of the screen on smaller devices for easier interaction.
+
+
+ Ensure all interactive elements are large enough to be tapped comfortably on touchscreens.
+
+
+ ),
+ },
+ ],
+ },
+ ],
+ },
+];
+
+const AccordionOverviewPage = () => {
+ return (
+
+
+
+
+
+
+ );
+};
+
+export default AccordionOverviewPage;
diff --git a/apps/website/screens/components/accordion/overview/examples/basicExample.ts b/apps/website/screens/components/accordion/overview/examples/basicExample.ts
new file mode 100644
index 0000000000..0d726ff8d8
--- /dev/null
+++ b/apps/website/screens/components/accordion/overview/examples/basicExample.ts
@@ -0,0 +1,86 @@
+import { DxcAccordion, DxcInset, DxcBadge, DxcStatusLight, DxcFlex } from "@dxc-technology/halstack-react";
+import { useState } from "react";
+
+const code = `() => {
+ return (
+
+
+
+
+
+ Details
+
+
+
+
+
+
+ Details
+
+
+
+
+ }
+ subLabel="Jan, 09 2025"
+ >
+
+ Details
+
+
+
+
+ }
+ >
+
+ Details
+
+
+
+
+ }}
+ label="Life Policy"
+ subLabel="Ref - 1236554546"
+ >
+
+ Details
+
+
+
+
+ }}
+ label="Life Policy"
+ statusLight={}
+ subLabel="Ref - 1236554546"
+ >
+
+ Details
+
+
+
+
+
+ );
+}`;
+
+const scope = {
+ DxcAccordion,
+ DxcInset,
+ DxcBadge,
+ DxcFlex,
+ DxcStatusLight,
+ useState,
+};
+
+export default { code, scope };
diff --git a/apps/website/screens/components/accordion/overview/examples/nestedExample.ts b/apps/website/screens/components/accordion/overview/examples/nestedExample.ts
new file mode 100644
index 0000000000..17ab246ea1
--- /dev/null
+++ b/apps/website/screens/components/accordion/overview/examples/nestedExample.ts
@@ -0,0 +1,37 @@
+import { DxcAccordion, DxcInset, DxcBadge, DxcStatusLight, DxcFlex } from "@dxc-technology/halstack-react";
+import { useState } from "react";
+
+const code = `() => {
+ return (
+
+
+
+
+
+
+
+ Details
+
+
+
+
+
+
+
+ );
+}`;
+
+const scope = {
+ DxcAccordion,
+ DxcInset,
+ DxcBadge,
+ DxcFlex,
+ DxcStatusLight,
+ useState,
+};
+
+export default { code, scope };
diff --git a/apps/website/screens/components/accordion/overview/images/accordion_anatomy.png b/apps/website/screens/components/accordion/overview/images/accordion_anatomy.png
new file mode 100644
index 0000000000..a6d49b7f7a
Binary files /dev/null and b/apps/website/screens/components/accordion/overview/images/accordion_anatomy.png differ
diff --git a/apps/website/screens/components/accordion/overview/images/accordion_placement.png b/apps/website/screens/components/accordion/overview/images/accordion_placement.png
new file mode 100644
index 0000000000..f2e19cd4e5
Binary files /dev/null and b/apps/website/screens/components/accordion/overview/images/accordion_placement.png differ
diff --git a/apps/website/screens/components/accordion/specs/AccordionSpecsPage.tsx b/apps/website/screens/components/accordion/specs/AccordionSpecsPage.tsx
deleted file mode 100644
index 3430294597..0000000000
--- a/apps/website/screens/components/accordion/specs/AccordionSpecsPage.tsx
+++ /dev/null
@@ -1,611 +0,0 @@
-import { DxcFlex, DxcTable, DxcLink, DxcParagraph, DxcBulletedList } from "@dxc-technology/halstack-react";
-import QuickNavContainer from "@/common/QuickNavContainer";
-import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
-import Code from "@/common/Code";
-import Figure from "@/common/Figure";
-import DocFooter from "@/common/DocFooter";
-import Image from "@/common/Image";
-import accordionStates from "./images/accordion_states.png";
-import accordionAnatomy from "./images/accordion_anatomy.png";
-import accordionSpecs from "./images/accordion_specs.png";
-
-const sections = [
- {
- title: "Specifications",
- content: (
-
-
-
- ),
- },
- {
- title: "States",
- content: (
- <>
-
- The accordion header can get four different states based on user interaction. States: enabled
- , hover, focus and disabled.
-
-
-
-
- >
- ),
- },
- {
- title: "Anatomy",
- content: (
- <>
-
-
- Header
-
- Left secondary element (Optional)
-
- Title
- Sublabel
-
- Right secondary element (Optional)
-
-
- Caret icon (Expand/collapse)
-
- Content area
-
- >
- ),
- },
- {
- title: "Design tokens",
- subSections: [
- {
- title: "Color",
- content: (
-
-
-