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

@typoconsult/next-strapi-factory

v1.1.2

Published

A reusable component library for Next.js and Strapi projects, built with TypeScript and TailwindCSS.

Downloads

1

Readme

Next Strapi Factory

A reusable component library for Next.js and Strapi projects, built with TypeScript and TailwindCSS.

Installation

To install the next-strapi-factory component library, run the following command:

npm i @typoconsult/next-strapi-factory

Peer Dependencies

This component library has the following peer dependencies:

  • react: ^18.0.0
  • react-dom: ^18.0.0
  • next: ^13.0.0

Make sure your project has these dependencies installed.

Setup

TailwindCSS

The library is built with TailwindCSS and relies on a primary color. The primary color needs to be configured in the tailwind.config.js file of your project, like this:

module.exports = {
    // ...
    theme: {
        extend: {
            colors: {
                primary: {
                    100: '#ffb14d',
                    200: '#ff8700',
                    300: '#de7805'
                }
            }
        }
    },
    // ...
};
  • Primary 100: A lighter shade of the primary color. This variant can be used for lighter backgrounds, hover effects, and other cases where a less intense primary color is desired.
  • Primary 200: The default primary color. This is the main color used for buttons, links, and other interactive elements.
  • Primary 300: A darker shade of the primary color. This variant can be used for active states, focus outlines, and other cases where a more intense primary color is needed.

FontAwesome

The library uses FontAwesome Pro to provide a wide range of high-quality icons for your components. To use FontAwesome Pro, you need to have a valid FontAwesome Pro token.

By default, the various components are using the light icon variant, but buttons and links also accept all other variants, they just need to be installed manually in your project, like so:

npm i @fortawesome/pro-regular-svg-icons

Usage

Components

To use a component from the next-strapi-factory library, simply import it into your project:

import { FC } from 'react';
import { Button } from '@typoconsult/next-strapi-factory';

const MyApp: FC = () => {
    return (
        <div>
            <Button text="Click me!" onClick={() => alert('Button clicked!')}/>
        </div>
    );
};

export default MyApp;

For a full overview of the available components including how to use it. This project also comes with a Storybook, that can be started by running:

npm run storybook

For the above to work, you need to clone and set up the project locally.

Hooks

The library also includes some useful hooks. Read the docs for more:

Contributing

If you'd like to contribute to the development of next-strapi-factory, please follow these steps:

  1. Fork the repository on GitHub.
  2. Clone your fork to your local machine.
  3. Install the dependencies with npm install.
  4. Create a new branch for your feature or bugfix.
  5. Make your changes and commit them to your branch.
  6. Push your branch to your fork on GitHub.
  7. Create a pull request from your branch to the main repository.