0.16.2 • Published 29 days ago

@bolttech/atoms-header v0.16.2

Weekly downloads
-
License
-
Repository
-
Last release
29 days ago

Header Component

A responsive header component that includes a logo, call-to-action button, navigation links, icons, and language selector.

Installation

Use the package manager npm or yarn to install the component and its dependencies.

npm install @bolttech/frontend-foundations @bolttech/atoms-header

or

yarn add @bolttech/frontend-foundations @bolttech/atoms-header

Props

The Header component accepts the following properties:

PropTypeDescription
idstringThe id attribute of the header component.
dataTestIdstringThe data-testid attribute for testing.
logoobjectObject containing the information of the logo.
ctaobjectAn object containing variant, label, and onClick properties for the CTA button.
linksarrayAn array of objects containing href, label, and selected properties for links.
iconsarrayAn array of objects containing href and icon properties for icons.
languagesarrayAn array of objects containing href and label properties for language selector links.

Usage

import React from 'react';
import { Header } from '@bolttech/atoms-header';
import { bolttechTheme, BolttechThemeProvider } from '@bolttech/frontend-foundations';

const ExampleComponent = () => {
  const ctaButton = {
    variant: 'primary',
    label: 'Get Started',
    onClick: () => console.log('Button Clicked'),
  };

  const navLinks = [
    { href: '/home', label: 'Home', selected: true },
    { href: '/about', label: 'About', selected: false },
    { href: '/contact', label: 'Contact', selected: false },
  ];

  const socialIcons = [
    { href: 'https://twitter.com', icon: 'https://example.com/twitter.png' },
    { href: 'https://facebook.com', icon: 'https://example.com/facebook.png' },
  ];

  const languages = [
    { href: '/en', label: 'EN' },
    { href: '/fr', label: 'FR' },
  ];

  const logo = { image: 'https://example.com/logo.png', href: '/' };

  return (
    <BolttechThemeProvider theme={bolttechTheme}>
      <Header id="header" dataTestId="custom-header" logo={logo} cta={ctaButton} links={navLinks} icons={socialIcons} languages={languages} />
    </BolttechThemeProvider>
  );
};

export default ExampleComponent;

Contributing

Contributions are welcome! For any bug fixes, improvements, or new features, please open an issue or submit a pull request.

Please make sure to follow the code standards and test your changes before submitting.

0.16.2

29 days ago

0.16.1

4 months ago

0.11.0

9 months ago

0.12.0

9 months ago

0.13.0

8 months ago

0.14.0

7 months ago

0.13.1

8 months ago

0.15.0

6 months ago

0.16.0

6 months ago

0.15.1

6 months ago

0.13.3

8 months ago

0.13.4

8 months ago

0.10.0

9 months ago

0.9.0

10 months ago

0.8.0

10 months ago

0.9.1

10 months ago

0.5.0

10 months ago

0.7.0

10 months ago

0.6.0

10 months ago

0.4.2

10 months ago

0.4.1

10 months ago

0.0.1

11 months ago

0.4.0

11 months ago

0.2.13

12 months ago

0.2.12

12 months ago

0.2.11

12 months ago

0.3.0

11 months ago

0.3.2

11 months ago

0.3.1

11 months ago

0.2.10

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago