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

@marianapatcosta/links-keeper

v1.0.10

Published

LinksKeeper is a package to group, manage and display all your network links in the same place.

Downloads

15

Readme

Links Keeper

Links Keeper is a package to group, manage and display all your network links, e-mail and phone numbers in the same place. It was developed with TypeScript, React, Vite and SCSS modules. It is available in 2 modes: Static mode and Dynamic mode, which are configured based on providing or not props to the LinksKeeper component.

links-keeperA

A Static demo is deployed here.

A Dynamic demo is deployed as an installable, offline-first PWA here.

Download from Google Play Store .

Installation

npm

npm install @marianapatcosta/links-keeper

yarn

yarn add @marianapatcosta/links-keeper

Static Mode

In this mode, LinksKeeper can be used as an external component to pass the information to be displayed as props. The application can be deployed and the static information displayed in the app.

Provides the following functionalities:

  • Custom app colors and data by passing them as props.
  • Visualize user's avatar, name and links.
  • Generate QRCode, sharing URL, download link card (1).

(1) Note: if the provided avatar is site url instead of an upload image, only the QR code will be available in the card.

Get Started

You can customize the component, by defining your own profile and colors object passing them as props. For Static mode, LinksKeeper component can be used as described in the example below and in App.tsx file:

const Component = () => {
  return (
    <LinksKeeper
      profile={{
        links: [
          {
            id: '1',
            label: 'My LinkedIn',
            url: 'https://www.linkedin.com/in/',
            icon: faLinkedin,
          },
        ],
        username: 'Username',
        avatarUrl: 'https://your-avatar-url',
      }}
      colors={{ primary: '#023e83', secondary: '#2174d4', font: '#ffffff' }}
    />
  )
}

Props

| Prop name | Type | Description | Default | | ----------------- | :------------- | -----------------------------------------------------------------------------------: | ------: | | profile* | Profile | Provides information to display. Includes avatarUrl, username and links array | - | | colors* | ColorsSettings | Provides de colors to be used in the app. Includes primary, secondary and font | - | | additionalClass* | string | css class name to apply to the base component. | - |

Colors prop

| Field name | Type | Description | Default | | ----------- | :--------------- | ---------------------------------------------: | --------: | | primary* | string (hexcode) | Hexcode for the primary/main color of the app. | '#023e83' | | secondary* | string (hexcode) | Hexcode for the secondary color of the app. | '#2174d4' | | font* | string (hexcode) | Hexcode for the fontn color of the app. | '#ffffff' |

Profile prop

| Field name | Type | Description | Default | | ----------- | :----- | -------------------------------------------------------------------------------------------------------------------------------------------------: | ------: | | avatarUrl* | string | URL for user's avatar | - | | username* | string | name of the user | - | | links | Link[] | Array of links, e-mails, phone numbers to be displayed. Each link must have and id (string), label (string), url (string), and icon (Icon) | - |

*optional

These objects must following structure:

interface LinksKeeperProps {
  profile?: Profile
  colors?: ColorSettings
  additionalClass?: string
}

type Profile = {
  links: Link[]
  username?: string
  avatarUrl?: string
}

type ColorSettings = {
  primary?: string
  secondary?: string
  font?: string
}

type Link = {
  id: string
  label: string
  url: string
  icon: Icon // Font-awesome icons; the available icons are stated below
}

type Icon = 
  faApple|
  faDiscord|
  faDribbble|
  faFigma|
  faGithub|
  faGoogleDrive|
  faGooglePlay|
  faInstagram|
  faLinkedin|
  faMastodon|
  faPatreon|
  faReddit|
  faShopify|
  faSpotify|
  faStackOverflow|
  faTelegram|
  faTiktok|
  faTwitch|
  faTwitter|
  faWhatsapp|
  faYoutube|
  faBlog|
  faBriefcase|
  faCartShopping|
  faEnvelope|
  faGraduationCap|
  faHouse|
  faMobileScreen|
  faUser

Dynamic Mode

In this mode, LinksKeeper can be used as an external component without passing any props. It relies on browser's LocalStorage API to manage (display, add, edit and delete) user's links, e-mails and phone. The application can be deployed and the dynamic information displayed in the app. This is useful for a personal contact list with users's own contacts and contacts from other people. Can be particularly useful if integrated in an offline-first application.

Provides the following functionalities:

  • Add, edit, filter, delete links, e-mails or phone numbers.
  • Generate QRCode, sharing URL, download link card.
  • Custom the app colors.

Get Started

For dynamic mode, LinksKeeper component can be used as described in the example below and in App.tsx file:

const Component = () => {
  return <LinksKeeper />
}

Available Scripts

yarn install

Installs all the dependencies required to run and develop this application.

yarn dev

Open http://localhost:5173 with your browser to see the result.

yarn build

Build a production-ready application. Note: for building demo page, remove build field in vite.config.ts file.

yarn preview

Runs the production build locally

yarn deploy

Deploys Demo page to github pages