1.0.0 • Published 7 months ago

@element-public/react-footer v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Footer

Description

The Footer provides a container in which navigation, copyrights, and help can be organized.

See live demos on storybook

Storybook Footer Demos

Install bundle from npm-e

npm i @element-public/react-components @element-public/themes

Optional: install the component individually

npm i @element-public/react-footer @element-public/themes

Open ~/.npmrc in an editor and add the following line to enable the @element-public scope:

@element-public:registry=https://npm.platforms.engineering

Troubleshooting

See below if you have never installed a package from Bayer's npm-enterprise or run into the following error:

npm ERR! code E401
npm ERR! Unable to authenticate, your authentication token seems to be invalid.
npm ERR! To correct this please trying logging in again with:
npm ERR!     npm login

Setup an access token

See the devtools npm-e guide to learn how to create an access token if this is the first time you are using a npm-e package at Bayer or you do not have a line that starts with the following in your ~/.npmrc file:

//npm.platforms.engineering/:_authToken=

Notes

The Footer component is normally placed at the bottom of the page to display things such as lists, links, buttons and copyrights. The created component provides functionality to create custom lists, buttons with icons, and text for copyrights. Using the Footer is a good way to organize navigation, special links, icons, and contact information.

Footer Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
themeColorstring'surface'falseColor of the Footer.Accepted Values: transparent, surface, surface-variant, primary, primary-variant, primary-50, primary-100, primary-200, primary-300, primary-400, primary-500, primary-600, primary-700, primary-800, primary-900, secondary, secondary-variant, secondary-50, secondary-100, secondary-200, secondary-300, secondary-400, secondary-500, secondary-600, secondary-700, secondary-800, secondary-900, danger, danger-variant, danger-50, danger-100, danger-200, danger-300, danger-400, danger-500, danger-600, danger-700, danger-800, danger-900, ancillary-100, ancillary-200, ancillary-300, ancillary-400, ancillary-500, ancillary-600, ancillary-700, ancillary-800, ancillary-900
useContentMaxWidthbooleanfalsefalseIf true the footer's content will have a max width according to your theme's breakpoints.

Footer Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for Footer content

Footer Bottom Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
lgColsstring|number'3'falseHow many columns to create for the large breakpoint.
mdColsstring|number'1'falseHow many columns to create for the medium breakpoint.
smColsstring|number'1'falseHow many columns to create for the small breakpoint.
themeColorstring'surface'falseColor of the Footer Bottom.Accepted Values: transparent, surface, surface-variant, primary, primary-variant, primary-50, primary-100, primary-200, primary-300, primary-400, primary-500, primary-600, primary-700, primary-800, primary-900, secondary, secondary-variant, secondary-50, secondary-100, secondary-200, secondary-300, secondary-400, secondary-500, secondary-600, secondary-700, secondary-800, secondary-900, danger, danger-variant, danger-50, danger-100, danger-200, danger-300, danger-400, danger-500, danger-600, danger-700, danger-800, danger-900, ancillary-100, ancillary-200, ancillary-300, ancillary-400, ancillary-500, ancillary-600, ancillary-700, ancillary-800, ancillary-900

Footer Bottom Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for Footer content
copyrightContentReact.ReactNodenullfalseThe center content of the FooterBottom component.
footerIconsReact.ReactNodenullfalseExpects one or more FooterIcons, will accept any valid components or markup.
linksReact.ReactNodenullfalseA container for common links.

Footer Bottom Content Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.

Footer Bottom Content Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for FooterBottom content.

Footer Bottom Group Props

NameTypeDefaultRequiredDescription
alignmentstringundefinedfalseContent alignment.Accepted Values: start, center, end
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
gapstring'standard'falseThe spacing between items.Accepted Values: none, dense, standard, airy
lgColSpanstring|number'1'falseHow many columns to span the large breakpoint when customizing Footer Bottom columns.
marginstring'standard'falseThe top and bottom spacing around the group component.Accepted Values: none, dense, standard, airy
mdColSpanstring|number'1'falseHow many columns to span the medium breakpoint when customizing Footer Bottom columns.
smColSpanstring|number'1'falseHow many columns to span the small breakpoint when customizing Footer Bottom columns.
styleobjectnullfalsePassthrough style object.

Footer Bottom Group Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for FooterBottom content.

Footer Bottom Wrapper Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
themeColorstring'surface'falseColor of the Footer Bottom.Accepted Values: transparent, surface, surface-variant, primary, primary-variant, primary-50, primary-100, primary-200, primary-300, primary-400, primary-500, primary-600, primary-700, primary-800, primary-900, secondary, secondary-variant, secondary-50, secondary-100, secondary-200, secondary-300, secondary-400, secondary-500, secondary-600, secondary-700, secondary-800, secondary-900, danger, danger-variant, danger-50, danger-100, danger-200, danger-300, danger-400, danger-500, danger-600, danger-700, danger-800, danger-900, ancillary-100, ancillary-200, ancillary-300, ancillary-400, ancillary-500, ancillary-600, ancillary-700, ancillary-800, ancillary-900

Footer Bottom Wrapper Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseContent to be rendered inside the Footer Bottom. Accepts any valid markup.

Footer Col Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
lgColSpanstring|number'1'falseHow many columns to span the large breakpoint when customizing Footer Bottom columns.
mdColSpanstring|number'1'falseHow many columns to span the medium breakpoint when customizing Footer Bottom columns.
smColSpanstring|number'1'falseHow many columns to span the small breakpoint when customizing Footer Bottom columns.
tagstring|React.ElementType'div'falseBy default a div will be rendered, this allow another tag to be used instead. A block type component is suggested.
titlestringundefinedfalseThe header title of the content in footer.

Footer Col Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for FooterCol content

Footer Content Props

NameTypeDefaultRequiredDescription
gapstring'64px'falseGap between the columns and the pixels. Must be a valid css gap declaration for css display grid
lgColsstring|numberundefinedfalseHow many columns to create for the large breakpoint.
mdColsstring|numberundefinedfalseHow many columns to create for the medium breakpoint.
smColsstring|number'1'falseHow many columns to create for the small breakpoint.
themeColorstringnullfalseColor of the Footer.Accepted Values: transparent, surface, surface-variant, primary, primary-variant, primary-50, primary-100, primary-200, primary-300, primary-400, primary-500, primary-600, primary-700, primary-800, primary-900, secondary, secondary-variant, secondary-50, secondary-100, secondary-200, secondary-300, secondary-400, secondary-500, secondary-600, secondary-700, secondary-800, secondary-900, danger, danger-variant, danger-50, danger-100, danger-200, danger-300, danger-400, danger-500, danger-600, danger-700, danger-800, danger-900, ancillary-100, ancillary-200, ancillary-300, ancillary-400, ancillary-500, ancillary-600, ancillary-700, ancillary-800, ancillary-900

Footer Content Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for Footer content

Footer Divider Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.

Footer Icon Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
iconstring|React.ReactNodenullfalseFor simple use-cases, this will automatically create the icon object.
themeColorstring'gray'falseColor variations. Variants prefixed with filled- will add a background color to the icon according to the theme. Variants prefixed with color- will change the color of the icon according to the theme.Accepted Values: filled-danger-alt, filled-danger, filled-muted, filled-primary, filled-secondary, color-primary, color-secondary, color-on-dark, blue, gray, green, orange, purple, red, teal, yellow

Footer List Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
lgColSpanstring|number'1'falseHow many columns to span the large breakpoint when customizing Footer Bottom columns.
mdColSpanstring|number'1'falseHow many columns to span the medium breakpoint when customizing Footer Bottom columns.
smColSpanstring|number'1'falseHow many columns to span the small breakpoint when customizing Footer Bottom columns.
titlestringundefinedfalseThe header title of the content in footer.

Footer List Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for FooterList content

Footer List Item Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.

Footer List Item Render Props

NameTypeDefaultRequiredDescription
childrenReact.ReactNodenullfalseThe default container for FooterBottom content.

Footer Logo Props

NameTypeDefaultRequiredDescription
classNamestringundefinedfalseThe css class name to be passed through to the component markup.
logostring|React.ReactNodenullfalseOptional logo. Expects an image but accepts any valid markup.