How do I make a footer component in reactstrap?

q3e picture q3e · Aug 27, 2018 · Viewed 8.6k times · Source

I am using reactstrap to build a sticky footer component like this example but I cannot find a dedicated footer component.

The only other way is to just use html:

<footer class="footer">
  <div class="container">
    <span class="text-muted">Place sticky footer content here.</span>
  </div>
</footer>

The problem is the above is not picking my .footer class. That is a different problem, but for now I just want to know if there is a better way.

Footer is only defined in Cards

Answer

mcssym picture mcssym · Aug 27, 2018
  1. In React we do not use class but className attribute. Normally it'll throw an error.
  2. Your example uses an additional CSS sticky-footer-navbar.css file provide by Bootstrap that is not provide by default with the compiled code. You have to include it by yourself after get it on their source code on Github Sticky Footer Navbar CSS Source Code