Jumbotron


Jumbotron - 图1

  1. import React from 'react';
  2. import { Jumbotron, Button } from 'reactstrap';
  3. const Example = (props) => {
  4. return (
  5. <div>
  6. <Jumbotron>
  7. <h1 className="display-3">Hello, world!</h1>
  8. <p className="lead">This is a simple hero unit, a simple Jumbotron-style component for calling extra attention to featured content or information.</p>
  9. <hr className="my-2" />
  10. <p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
  11. <p className="lead">
  12. <Button color="primary">Learn More</Button>
  13. </p>
  14. </Jumbotron>
  15. </div>
  16. );
  17. };
  18. export default Example;

Properties

  1. Jumbotron.propTypes = {
  2. // Pass in a Component to override default element
  3. tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
  4. fluid: PropTypes.bool,
  5. className: PropTypes.string
  6. };

Fluid Jumbotron


Jumbotron - 图2

  1. import React from 'react';
  2. import { Jumbotron, Container } from 'reactstrap';
  3. const Example = (props) => {
  4. return (
  5. <div>
  6. <Jumbotron fluid>
  7. <Container fluid>
  8. <h1 className="display-3">Fluid jumbotron</h1>
  9. <p className="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
  10. </Container>
  11. </Jumbotron>
  12. </div>
  13. );
  14. };
  15. export default Example;