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

@julioedi/montserrat-text

v1.0.3

Published

A customizable React Native Text component using the Montserrat font, supporting size variants and font weights.

Readme

🖋️ Custom Text Component for React Native (Montserrat-Based)

This Text component wraps react-native's Text component to enforce consistent typography using the Montserrat font family. It offers a flexible system for applying font sizes, weights, and styles through props and predefined variants.

✨ Features

  • Uses Montserrat font family by default.
  • Supports font weights (100–900) via friendly names like "Bold", "Regular", etc.
  • Supports italic styles.
  • Customizable font variants (tiny, body, title, etc.).
  • Allows changing the base font family if needed.

📦 Installation

  1. Install Montserrat font files in your project (e.g., through react-native-config, expo-font, or manual linking).

    Recommended font naming convention:

    Montserrat-100.ttf
    Montserrat-100-italic.ttf
    Montserrat-200.ttf
    Montserrat-200-italic.ttf
    ...
    Montserrat-900.ttf
    Montserrat-900-italic.ttf
  2. Register fonts in your app entry:

    // Example with Expo
    import * as Font from 'expo-font';
    import AppLoading from 'expo-app-loading';
    
    const loadFonts = () => Font.loadAsync({
      'Montserrat-400': require('./assets/fonts/Montserrat-Regular.ttf'),
      'Montserrat-400-italic': require('./assets/fonts/Montserrat-Italic.ttf'),
      'Montserrat-700': require('./assets/fonts/Montserrat-Bold.ttf'),
      // Add more as needed...
    });
    
    // Use in App component

🧩 Usage

import Text from '@julioedi/montserrat-text';

export default function App() {
    return (
        <>
            <Text variant="title" weight="Bold">Title Text</Text>
            <Text variant="body">Body Text (Regular)</Text>
            <Text variant="small" italic>Small Italic Text</Text>
            <Text weight={600} style={{ color: 'blue' }}>Custom Weight</Text>
        </>
    );
}

🛠 Props

| Prop | Type | Description | |----------|-----------------------------------|-------------| | variant| string | Uses a predefined font size like body, title, etc. | | weight | fontWeightType (100900 or "Bold" etc.) | Defines the font weight. | | italic | boolean | Applies italic style. | | style | TextStyle (without fontFamily) | Additional styles. | | children | ReactNode | Text content. |


🎨 Predefined Font Variants

These can be referenced via the variant prop:

Text.variants = {
    tiny: 10,
    small: 12,
    body: 14,
    medium: 16,
    large: 18,
    title: 22,
    heading: 26,
    display: 32,
}

➕ Add Custom Variants

Text.assignVariants({
    subtitle: 20,
    button: { fontSize: 16, letterSpacing: 1.2 },
});

🧬 Change Default Font Family

To use a font other than Montserrat:

Text.setFontName("YourFontName");

Then make sure your font files follow this pattern:

YourFontName-400.ttf
YourFontName-400-italic.ttf
YourFontName-700.ttf
...

📝 Notes

  • fontFamily and fontStyle should not be set manually via style.
  • All font styles should exist in your project under the naming scheme:
    FontName-weight[-italic], e.g., Montserrat-400-italic.

🧪 Example with Custom Font and Variant

Text.setFontName("CustomSans");

Text.assignVariants({
  callout: { fontSize: 17, lineHeight: 22 },
});
<Text variant="callout" weight="Medium">Custom Callout Text</Text>

📄 License

MIT