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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xsolla/xui-store-badge

v0.106.0

Published

A cross-platform React component for displaying official app store download badges with consistent styling for Google Play, App Store, and App Gallery.

Downloads

8,359

Readme

Store Badge

A cross-platform React component for displaying official app store download badges with consistent styling for Google Play, App Store, and App Gallery.

Installation

npm install @xsolla/xui-store-badge
# or
yarn add @xsolla/xui-store-badge

Demo

All Store Types

import * as React from 'react';
import { StoreBadge } from '@xsolla/xui-store-badge';

export default function AllStores() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
      <StoreBadge type="google-play" />
      <StoreBadge type="app-store" />
      <StoreBadge type="app-gallery" />
    </div>
  );
}

Light Palette

import * as React from 'react';
import { StoreBadge } from '@xsolla/xui-store-badge';

export default function LightBadges() {
  return (
    <div style={{ display: 'flex', gap: 16, background: '#f5f5f5', padding: 24 }}>
      <StoreBadge type="google-play" palette="light" />
      <StoreBadge type="app-store" palette="light" />
    </div>
  );
}

Clickable Badges

import * as React from 'react';
import { StoreBadge } from '@xsolla/xui-store-badge';

export default function ClickableBadges() {
  return (
    <div style={{ display: 'flex', gap: 16 }}>
      <StoreBadge
        type="google-play"
        onPress={() => window.open('https://play.google.com/store/apps/details?id=com.example')}
      />
      <StoreBadge
        type="app-store"
        onPress={() => window.open('https://apps.apple.com/app/example/id123456789')}
      />
    </div>
  );
}

Anatomy

import { StoreBadge } from '@xsolla/xui-store-badge';

<StoreBadge
  type="google-play"       // google-play, app-store, app-gallery
  palette="dark"           // dark or light
  onPress={handlePress}    // Click handler
  data-testid="badge"      // Test ID
/>

Examples

App Download Section

import * as React from 'react';
import { StoreBadge } from '@xsolla/xui-store-badge';

export default function AppDownload() {
  return (
    <section style={{ textAlign: 'center', padding: 48 }}>
      <h2>Download Our App</h2>
      <p style={{ marginBottom: 24, color: '#666' }}>
        Available on your favorite platforms
      </p>
      <div style={{ display: 'flex', gap: 16, justifyContent: 'center' }}>
        <StoreBadge
          type="google-play"
          onPress={() => window.open('https://play.google.com')}
        />
        <StoreBadge
          type="app-store"
          onPress={() => window.open('https://apps.apple.com')}
        />
      </div>
    </section>
  );
}

Footer Badges

import * as React from 'react';
import { StoreBadge } from '@xsolla/xui-store-badge';

export default function FooterBadges() {
  return (
    <footer style={{ background: '#1a1a1a', padding: '48px 24px' }}>
      <div style={{ maxWidth: 800, margin: '0 auto' }}>
        <h3 style={{ color: '#fff', marginBottom: 16 }}>Get the Mobile App</h3>
        <div style={{ display: 'flex', gap: 12, flexWrap: 'wrap' }}>
          <StoreBadge type="google-play" palette="dark" />
          <StoreBadge type="app-store" palette="dark" />
          <StoreBadge type="app-gallery" palette="dark" />
        </div>
      </div>
    </footer>
  );
}

Responsive Layout

import * as React from 'react';
import { StoreBadge } from '@xsolla/xui-store-badge';

export default function ResponsiveBadges() {
  return (
    <div style={{
      display: 'flex',
      flexDirection: 'column',
      gap: 12,
      alignItems: 'center',
    }}>
      <StoreBadge type="google-play" />
      <StoreBadge type="app-store" />
    </div>
  );
}

API Reference

StoreBadge

StoreBadgeProps:

| Prop | Type | Default | Description | | :--- | :--- | :------ | :---------- | | type | "google-play" \| "app-store" \| "app-gallery" | - | Store type to display. | | palette | "dark" \| "light" | "dark" | Color scheme. | | onPress | () => void | - | Click handler for the badge. | | data-testid | string | - | Test identifier. | | className | string | - | CSS class name. |

Badge Specifications

| Dimension | Value | | :-------- | :---- | | Height | 87px | | Min Width | 253px | | Border Radius | 11px | | Border Width | 2px | | Padding | 20px horizontal |

Palette Styles

| Palette | Background | Border | | :------ | :--------- | :----- | | dark | #100f0d | #a6a6a6 | | light | #ffffff | #000000 |

Store Types

| Type | Description | | :--- | :---------- | | google-play | Google Play Store badge | | app-store | Apple App Store badge | | app-gallery | Huawei App Gallery badge |

Use Cases

  • Mobile app landing pages
  • Website footers
  • Marketing materials
  • App download prompts
  • Multi-platform app promotion

Accessibility

  • Badges have appropriate alt text for screen readers
  • Clickable badges show cursor pointer
  • Focus states are visible for keyboard navigation
  • Link behavior when onPress is provided