0.0.10 • Published 6 years ago

ambsa-hero v0.0.10

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Ambsa Hero

A hero template for react.

image

About

Ambsa Hero is a react module that renders a hero wrapper.

Installation

To install:

npm install ambsa-hero

Example

To build an example locally:

Clone the project:

git clone https://github.com/allansachsambia/AmbsaHero.git

Go into the AmbsaHero directory and run:

npm run start

Go to http://localhost:8000/ in your web browser.

Use

import AmbsaHero from "ambsa-hero";

export default class Index extends React.Component {
  render() {
    const image = "https://picsum.photos/1800/1224/?random";  
    return (
      <div>
        <AmbsaHero image={image} stick="right" brightness="lighter">
          <div>
            <h1 className="ambsa-hero-display">Ambsa Hero</h1>
            <p className="ambsa-hero-lead">
              Maecenas gravida, sem id tincidunt aliquam, lorem nunc vulputate
              mauris, non gravida arcu nisi quis tellus. Integer euismod
              molestie elit, et euismod felis tristique et. Proin tristique
              tempor erat, nec scelerisque diam varius quis. Ut convallis mi non
              tortor egestas vulputate. Maecenas eu varius dui. Duis eget augue
              nec orci fringilla bibendum.
            </p>
          </div>
        </AmbsaHero>
      </div>
    );
  }
}

Styles

The hero can be used with or without nested content. If it is used without nested content the component will default to a height of 100vh at all sizes. If it's used with nested content, that content will be set to a max-width of 1012px and it's size will expand and contract vertically relative to that nested contents size and utilize responsive top and bottom padding. At 900px and under, the nested content will also change from row to column and text-align on the whole component will switch to center.

Properties

PropertyTypeDescription
imagestringoptional; background image url
stickstringoptional; background-position position helper for the background image limited to max-width: 1300px. Options: 'left', 'center', and 'right'
brightnessstringoptional; sets the brightness of the background image. Options: 'darker', 'dark', 'light', and 'lighter'.
0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago