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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@atom-design-mog/tabs

v1.0.1

Published

A flexible React Native Tabs component with multiple style variants.

Readme

@atom-design-mog/tabs

A customizable and flexible Tabs Component for React Native with multiple variants like radius tabs, underline tabs, and rounded styles.

This package helps you easily implement switchable tab UIs with clean design and multiple appearance options.


📦 Installation

Install with npm:

npm install @atom-design-mog/tabs

Or with yarn:

yarn add @atom-design-mog/tabs

📲 Import

import Tabs from '@atom-design-mog/tabs';

🚀 Usage Example

import React, { useState } from 'react';
import { View, Text } from 'react-native';
import Tabs from '@atom-design-mog/tabs';

export default function App() {
  const [activeTab, setActiveTab] = useState('0');

  const TabNames = [
    { id: '0', name: 'Tab 1' },
    { id: '1', name: 'Tab 2' },
    { id: '2', name: 'Tab 3' },
  ];

  return (
    <View style={{ padding: 20 }}>
      <Tabs
        tabs={TabNames}
        activeTab={activeTab}
        onTabChange={setActiveTab}
        variant="allRadius"
      />

      <Text style={{ marginTop: 20 }}>Selected Tab: {activeTab}</Text>
    </View>
  );
}

🎨 Available Variants

| Variant | Description | | -------------------------- | ----------------------------------------------- | | allRadius | All tabs have border-radius applied (default). | | leftRightRadius | Only first and last tab have rounded corners. | | noRadius | No border-radius on tabs. | | roundedRadius | Fully rounded pill-shaped tabs. | | dualLineTopRadius | Top radius for all tabs, good for card headers. | | underLineTabBackground | Underline-style tabs with bottom indicator. |


🧪 Full Demo (as used in testing)

import React, { useState } from 'react';
import { View, Text, ScrollView, StyleSheet } from 'react-native';
import Tabs from '@atom-design-mog/tabs';

export default function TestTabsScreen() {
  const [activeTab1, setActiveTab1] = useState('0');
  const [activeTab2, setActiveTab2] = useState('0');
  const [activeTab3, setActiveTab3] = useState('0');
  const [activeTab4, setActiveTab4] = useState('0');
  const [activeTab5, setActiveTab5] = useState('0');
  const [activeTab6, setActiveTab6] = useState('0');

  const TabNames = [
    { id: '0', name: 'Tab 1' },
    { id: '1', name: 'Tab 2' },
    { id: '2', name: 'Tab 3' },
  ];

  return (
    <ScrollView style={{ flex: 1 }}>
      <View style={styles.wrapper}>
        <Text style={styles.title}>All Radius Tabs</Text>
        <Tabs tabs={TabNames} activeTab={activeTab1} onTabChange={setActiveTab1} variant="allRadius" />

        <Text style={styles.title}>Left Right Radius Tabs</Text>
        <Tabs tabs={TabNames} activeTab={activeTab2} onTabChange={setActiveTab2} variant="leftRightRadius" />

        <Text style={styles.title}>No Radius Tabs</Text>
        <Tabs tabs={TabNames} activeTab={activeTab3} onTabChange={setActiveTab3} variant="noRadius" />

        <Text style={styles.title}>Rounded Radius Tabs</Text>
        <Tabs tabs={TabNames} activeTab={activeTab4} onTabChange={setActiveTab4} variant="roundedRadius" />

        <Text style={styles.title}>Dual Line Top Radius Tabs</Text>
        <Tabs tabs={TabNames} activeTab={activeTab5} onTabChange={setActiveTab5} variant="dualLineTopRadius" />

        <Text style={styles.title}>Underline Tab Background</Text>
        <Tabs tabs={TabNames} activeTab={activeTab6} onTabChange={setActiveTab6} variant="underLineTabBackground" />
      </View>
    </ScrollView>
  );
}

const styles = StyleSheet.create({
  wrapper: { padding: 20, gap: 20 },
  title: { fontSize: 16, fontWeight: '600', marginBottom: 6 },
});

📘 Props

| Prop | Type | Required | Description | | --------------- | ------------------- | -------- | ------------------------------------------------------------- | | tabs | Array<{id, name}> | ✔️ Yes | Array of tabs with ID and display name. | | activeTab | string | ✔️ Yes | Currently selected tab ID. | | onTabChange | (id) → void | ✔️ Yes | Callback when tab changes. | | variant | string | ✖️ No | Apply any of the variants listed above. Default: allRadius. |


🎯 Features

  • Multiple customizable styles
  • Clean, responsive design
  • Easy integration and fully controlled behavior
  • Works with any React Native project

👤 Author

Avi Gupta