Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azerion/app-switcher

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azerion/app-switcher

A simple shadow dom dialog to switch between Azerion applications.

  • 1.0.0-alpha.4
  • unpublished
  • alpha
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

npm version code style: prettier

App Switcher

A simple shadow dom dialog to switch between Azerion applications.

Prerequisites

This project requires NodeJS (version 16 or later) and NPM. Node and NPM are really easy to install.

Table of contents

Getting Started

The package includes a shadow dom component, which can be used as follows:

import { startAppSwitcher } from '@azerion/app-switcher';

Within your HTML/ jsx component you can add the component:

<app-switcher></app-switcher>

Within your application, you can mount the app switcher by calling the startAppSwitcher function:

startAppSwitcher();

The result is a button, which can toggle the app switcher dialog.

Installation

BEFORE YOU INSTALL: please read the prerequisites

Install the library using npm or Yarn:

npm i @azerion/app-switcher

Or if you prefer using Yarn:

$ yarn add @azerion/app-switcher

Usage

Properties

The component has two properties, which is the currentProduct- and the open property. The currentProduct property is used to set the current product, which is used to filter the list of products. If your product is listed, then make sure to set this property.

<app-switcher currentProduct="my-product"></app-switcher>

The list of products available:

ProductValue
Improve Digital Originimprovedigital
Improve Digital Marketplacemarketplace
Zoominzoomin
Hybrid Theoryhybridtheory
GameDistributiongamedistribution
BlueStackbluestack
Azerion Rich Mediarichmedia
Azerion High Impacthighimpact
AdMooveadmoove
Strosslestrossle
Quantumquantum
PubGalaxypubgalaxy
Delta Projectsdeltaprojects

The open property is used to open the dialog. This property is optional, as the dialog can be opened by clicking the button.

<app-switcher open currentProduct="my-product"></app-switcher>

Styling the component

It is easy to style all the elements within the component. However, please refrain from changing too much, as we want to keep things consistent throughout all products.

Let's say you want to change the icon color of the button that toggles the dialog:

app-switcher::part(button) {
  fill: #9b9b9b;

  &:hover {
    fill: #363636;
  }
}

Or change the top margin of the dialog itself:

app-switcher::part(container) {
  margin-top: 40px;
}

Using your own button

The component provides a slot where you can set your own button. Lets say we have a component; simply add slot="button:

<app-switcher currentProduct="improvedigital">
  <StyledButton slot="button">Your button</StyledButton>
</app-switcher>

FAQs

Package last updated on 10 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc