npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-simple-flip

v1.1.4

Published

Very simple, yet configurable card flipping Vue component

Downloads

13

Readme

Vue Card Flip

This package is very simple, yet configurable card flipping Vue component.

Installation

To install in your project, run:

npm i vue-simple-flip -S

Configuration

In the component you wish the card to be, right below the script tag, add:

import FlipCard from "vue-simple-flip";

Naming convention is obviously up to you.

Register the Component

Inside of your component configuration, register the FlipCard by adding:

export default {
  // stuff
  components: {
    FlipCard
  },
  // really important stuff
}

Usage

Inside of your template, use the <FlipCard> anywhere you'd like.

<template>
  <FlipCard>
    // slots
  </FlipCard>
</template>

Props

Currently, 4 styling props are supported, all are type String.

  1. Height: height
  2. Width: width
  3. Background Color: backgroundColor
  4. Color: textColor

Example with fixed values:

<template>
  <FlipCard height="400px" width="300px"
    backgroundColor="#ffffff" color="#f3f3f3">
    // slots
  </FlipCard>
</template>

Example with dynamic values:

<template>
  <FlipCard :height="height" :width="width"
    :backgroundColor="chosenBackgroundColor" :color="chosenFontColor">
    // slots
  </FlipCard>
</template>

Currently media queries aren't implemented, but working on it.

Slots

This component uses 4 slots:

  1. Front of Card: front
  2. Front call to action: cta-slot-front
  3. Back of Card: back
  4. Back call to action: cta-slot-back

The slots can be anything you wish, just make sure you name them correctly.

Example:

<template>
  <FlipCard height="400px" width="300px"
     backgroundColor="#ffffff" color="#f3f3f3">
    <template slot="front">
      <div>
        This content will be on the front of the card.
      </div>
    </template>
    <template slot="cta-slot-front">
      <button>
        This will be the call to action to flip the card
      </button>
    </template>
    <template slot="back">
      <div>
        This content will be on the back of the card.
      </div>
    </template>
    <template slot="cta-slot-back">
      <i class="superIcon">
        This could be an icon
      </i>
    </template>
  </FlipCard>
</template>

Styles

  • The cards' content is centered.
  • Overflow is set to scroll.