Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rc-footer

react-component363.9kMIT0.6.8TypeScript support: included

Pretty Footer react component used in ant.design

react, react-component, react-footer, footer, antd, ant-design

readme

rc-footer 🐾

NPM version npm download dumi build status Codecov Dependencies DevDependencies bundle size

Pretty Footer react component used in ant.design and antv.vision.

Live Demo

https://react-component.github.io/footer/

Install

rc-footer

Usage

import Footer from 'rc-footer';
import 'rc-footer/assets/index.css'; // import 'rc-footer/asssets/index.less';
import { render } from 'react-dom';

render(
  <Footer
    columns={[
      {
        icon: (
          <img src="https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg" />
        ),
        title: '语雀',
        url: 'https://yuque.com',
        description: '知识创作与分享工具',
        openExternal: true,
      },
    ]}
    bottom="Made with ❤️ by AFX"
  />,
  mountNode,
);

API

Property Type Default Description
prefixCls string rc-footer
className string '' additional class name of footer
style React.CSSProperties | style properties of footer
columns Column Array [] columns data inside footer
bottom ReactNode | extra bottom area beneath footer columns
theme 'light' | 'dark' 'dark' preset theme of footer
backgroundColor string '#000' background color of footer
columnLayout 'space-around' | 'space-between' 'space-around' justify-content value of columns element
maxColumnsPerRow number - max count of columns for each row

Column

Property Type Default Description
icon ReactNode | icon that before column title
title ReactNode | title of column
items Item Array [] items data inside each column
className string '' additional class name of footer
style React.CSSProperties | style properties of footer

Column Item

Property Type Default Description
icon ReactNode | icon that before column title
title ReactNode | title of column
description ReactNode | description of column, come after title
url string | link url of item title
openExternal boolean false link target would be _blank if openExternal is ture
className string '' additional class name of footer
style React.CSSProperties | style properties of footer
LinkComponent React.ReactType 'a' the link element to render item

Development

npm install
npm start

License

rc-footer is released under the MIT license.

changelog

Changelog

0.6.0

  • support maxColumnsPerRow.

0.5.0

  • support theme="dark|light".

0.4.0

  • support columnLayout.
  • support backgroundColor.

0.3.0

  • support style and className for footer column and footer item.
  • support LinkComponent for footer item.

0.2.0

  • Fix lib and es folders missing.

0.1.0

  • First release.