Footer

mobile
withDivider
view

The page footer components. Use Footer for the desktop version and MobileFooter for the mobile version. Both components have the same properties.

PropTypes

PropertyTypeRequiredDefaultDescription
classNameStringFooter class name
menuItemsFooterMenuItem[]List of footer menu items
withDividerBooleanShow top border on the footer
moreButtonTitleStringThe more items button title
onMoreButtonClickMouseEventHandler<HTMLElement>The more button click handler
viewnormal or clearThe footer view
logoLogoPropsThe service logo properties
logoWrapperClassNamestringThe logo wrapper class name
copyrightstringThe copyright

view

  • normal - white background and all the configured elements
  • clear - transparent background and only the copyright

Usage

See demos

  • Desktop: src/components/Footer/desktop/__stories__/FooterShowcase.tsx,
  • Mobile: src/components/Footer/mobile/__stories__/MobileFooterShowcase.tsx.

Examples

import { Footer } from '@gravity-ui/navigation';

<Footer
    className="page-footer"
    withDivider={false}
    moreButtonTitle="Show more"
    copyright={`@ ${new Date().getFullYear()} "My Service"`}
    logo={{
        icon: logoIcon,
        iconSize: 24,
        text: 'My Service'
    }}
    menuItems={[
        {
            text: 'About Service',
            href: 'https://gravity-ui.com/',
            target: 'blank',
        },
        {
            text: 'Documentation',
            href: 'https://gravity-ui.com/',
            target: 'blank',
        },
        {
            text: 'Confidential',
            href: 'https://gravity-ui.com/',
            target: 'blank',
        },
    ]}
/>

<Footer
    className="page-footer"
    copyright={`@ ${new Date().getFullYear()} "My Service"`}
    view="clear"
/>

MobileFooter

import { MobileFooter } from '@gravity-ui/navigation';

<MobileFooter
    className="page-footer"
    withDivider={false}
    moreButtonTitle="Show more"
    copyright={`@ ${new Date().getFullYear()} "My Service"`}
    logo={{
        icon: logoIcon,
        iconSize: 24,
        text: 'My Service'
    }}
    menuItems={[
        {
            text: 'About Service',
            href: 'https://gravity-ui.com/',
            target: 'blank',
        },
        {
            text: 'Documentation',
            href: 'https://gravity-ui.com/',
            target: 'blank',
        },
        {
            text: 'Confidential',
            href: 'https://gravity-ui.com/',
            target: 'blank',
        },
    ]}
/>

<MobileFooter
    className="page-footer"
    copyright={`@ ${new Date().getFullYear()} "My Service"`}
    view="clear"
/>