GithubHelp home page GithubHelp logo

for-love-element's Introduction

for-love-element

A fun little web component that brings some love to your page

All you need is love, love for the web. You can express your love for your pages with this little component.

Basic usage

npm install --save-dev for-love-element
<for-love>
  Add anything you want here
</for-love>

You have already created some love on your page!

Customization

Some basic customization can be crated by using CSS custom properties (a.k.a CSS variables)

CSS Custom Property Description Type or example Default
--fl-heart-color Color of the hearts (unless multicolor option is active) any <color> #F8C8DC
--fl-heart-size Size of the heart 20px, 5vw, 10ch, ... 3vw
--fl-sway The amount swaying from left to right <integer> 5
--fl-iteration The amount of times the animation should play positive <integer> or infinite infinite
--fl-ease Easing of the animation ease-in, linear, cubic-bezier(.17,.67,.83,.67), ... ease-in-out

Options

There are 3 options available

Attribute Behaviour
amount Specify the amount of hearts being shown (max: 400)
multicolor Set a bunch of multi color hearts
(overrides the default color setting)
contained Use it for non-full page hearts where the parent element is set to position: relative

Example of the options usage:

<for-love amount="10" multicolor contained>
    Add anything you want here
</for-love>

Examples

I might set up a page with examples later on. For now, you can check out these CodePen links:

for-love-element's People

Contributors

brechtdr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.