Skip to content

edx/frontend-component-header-edx

Folders and files

NameName
Last commit message
Last commit date
Nov 7, 2024
Apr 4, 2022
Apr 23, 2024
Mar 20, 2024
Sep 6, 2023
Feb 27, 2025
Nov 28, 2024
Nov 28, 2024
Oct 24, 2023
Oct 25, 2024
Feb 8, 2021
Oct 2, 2024
Sep 12, 2019
Sep 12, 2019
Oct 12, 2023
Aug 2, 2024
Feb 12, 2024
Sep 12, 2019
Feb 12, 2024
Sep 16, 2019
Mar 3, 2025
Mar 3, 2025
Oct 2, 2023
Feb 12, 2024

frontend-component-header-edx

npm_version npm_downloads license

Purpose

This is the standard edX header for use in React applications. It has two exports:

  • default: The Header Component
  • messages: for i18n in the form of { locale: { key: translatedString } }

Cloning and Startup

1. Clone your new repo:

  ``git clone https://github.com/openedx/frontend-component-header-edx.git``

2. Use node v18.x.

  The current version of the micro-frontend build scripts support node 18.
  Using other major versions of node *may* work, but this is unsupported.  For
  convenience, this repository includes an .nvmrc file to help in setting the
  correct node version via `nvm <https://github.com/nvm-sh/nvm>`_.

3. Install npm dependencies:

  ``cd frontend-component-header-edx && npm ci``

4. Start the dev server:

  ``npm start``

Usage

import Header, { messages } from '@edx/frontend-component-header-edx';

Plugins

This component can be customized using Frontend Plugin Framework.

The parts of this component that can be customized in that manner are documented here.

Development

  • Install requirements npm install
  • Install peer dependencies npm install @edx/frontend-analytics @edx/frontend-platform @edx/frontend-i18n prop-types react
  • Start the example server npm start
  • Visit http://localhost:1234

License

The code in this repository is licensed under the AGPLv3 unless otherwise noted.

Please see LICENSE for details.

Reporting Security Issues

Please do not report security issues in public. Please email [email protected].