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

@moduware/morph-tabbar

v2.0.1

Published

Navigation bar for polymorph components

Downloads

2

Readme

morph-tabbar

License Published on webcomponents.org

A fast and lightweight custom web component tab bar that automatically detects device and looks native IOS or native Android, depending on current mobile OS. It uses LitElement base class.

Morph Components are now being updated to use lit-element as base class from polymer base class.

morph-tabbar is the containing parent element for the morph-tabbar-item. These components changes its appearance automatically based on whether the platform or device is IOS or Android.

Getting Started

For the information about how to clone the desired repository, running the local server and testing, please refer to Polymorph elements getting started docs at the end of this repository.

Demo


<h3>Andriod tabbar</h3>
<p>Click the items to see it in action</p>

<morph-tabbar platform="android" selected="play" label> 
  <morph-tabbar-item platform="android" name="play" not-selected-image="img/play_android.svg" selected-image="img/play_android_selected.svg" has-label>play</morph-tabbar-item>
  <morph-tabbar-item platform="android" name="favorite" not-selected-image="img/favorite_android.svg" selected-image="img/favorite_android_selected.svg" has-label>favorite</morph-tabbar-item>
  <morph-tabbar-item platform="android" name="mic" not-selected-image="img/mic_android.svg" selected-image="img/mic_android_selected.svg" has-label>mic</morph-tabbar-item>
</morph-tabbar>

<h3>IOS tabbar</h3>
<p>Click the items to see it in action</p>

<morph-tabbar platform="ios" selected="play" label>
  <morph-tabbar-item platform="ios" name="play" not-selected-image="img/play_ios.svg" selected-image="img/play_ios_selected.svg" has-label>play</morph-tabbar-item>
  <morph-tabbar-item platform="ios" name="favorite" not-selected-image="img/favorite_ios.svg" selected-image="img/favorite_ios_selected.svg" has-label>favorite</morph-tabbar-item>
  <morph-tabbar-item platform="ios" name="mic" not-selected-image="img/mic_ios.svg" selected-image="img/mic_ios_selected.svg" has-label>mic</morph-tabbar-item>
</morph-tabbar>
  • Here is a quick demo of the morph-tabbar element.

  <template>
    <h3>IOS morph-tabbar demo</h3>
    <morph-tabbar platform="ios" selected="play">
      <morph-tabbar-item platform="ios" name="play" not-selected-image="../img/play_ios.svg" selected-image="../img/play_ios_selected.svg"></morph-tabbar-item>
      <morph-tabbar-item platform="ios" name="favorite" not-selected-image="../img/favorite_ios.svg" selected-image="../img/favorite_ios_selected.svg"></morph-tabbar-item>
      <morph-tabbar-item platform="ios" name="mic" not-selected-image="../img/mic_ios.svg" selected-image="../img/mic_ios_selected.svg"></morph-tabbar-item>
    </morph-tabbar>
  </template>

<template>
  <h3>Android morph-tabbar with label demo</h3>
  <morph-tabbar platform="android" selected="play" label>
    <morph-tabbar-item platform="android" name="play" not-selected-image="../img/play_android.svg" selected-image="../img/play_android_selected.svg" label></morph-tabbar-item>
    <morph-tabbar-item platform="android" name="favorite" not-selected-image="../img/favorite_android.svg" selected-image="../img/favorite_android_selected.svg" label></morph-tabbar-item>
    <morph-tabbar-item platform="android" name="mic" not-selected-image="../img/mic_android.svg" selected-image="../img/mic_android_selected.svg" label></morph-tabbar-item>
  </morph-tabbar>
</template>

Attributes

| Custom Attribute | Type | Description | Default | |:----------------:|:-------:|----------------------------------------------------------------------------------------------------------------------------------|-------------| | selected | String | Takes the value of name attribute of the selected tabbar item. In order to have default selected item, assign it's name. | null | | label | Boolean | To have a tabbar with label assign true | false |

Styling

-For Android platform;

Custom property | Description | Default ---------------------------------|----------------------------------------|-------------------- --android-background-color | Background color of the tabbar | #0076FF --android-height | Height of the tabbar | 48px --android-labeled-height | Height of the tabbar with label | 72px --android-bar-color | Color of the highlight bar under tabbar| rgba(255,255,255,.7)

-For IOS platform;

Custom property | Description | Default ---------------------------------|----------------------------------------|-------------------- --ios-background-color | Background color of the tabbar | #f7f7f8 --ios-height | Height of the tabbar | 44px --ios-labeled-height | Height of the tabbar with label | 50px --ios-bar-color | Color of the highlight bar above tabbar| #c4c4c4

NOTE: For tabbar to take on the parent background color, you can assign --android-background-color: transparent or --ios-background-color: transparent

Further help

For more information on how to install and run test please go here - Polymorph elements getting started