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

next-initial

v1.0.50

Published

## [Create Next.js app](https://nextjs.org/docs/getting-started/installation)

Downloads

167

Readme

Next initial folders and files ( Next.js )

Create Next.js app

npx create-next-app@latest

Install Package

npm install -g next-initial

Initial create folders and files components

  • In File tailwind.config.ts
import type { Config } from "tailwindcss";

const config: Config = {
  content: [
    "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
  ],
  theme: {
    extend: {
      backgroundImage: {
        "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
        "gradient-conic":
          "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
      },
      colors: {
        onPrimary: "#334155",
        onSecondary: '#64758B',
        onTertiary: '#64758B',
        onError: '#FF5349',
        background: "var(--background)",
        foreground: "var(--foreground)",
        blue: "#1fb6ff",
        pink: "#ff49db",
        orange: "#ff7849",
        green: "#13ce66",
        "gray-dark": "#273444",
        gray: "#8492a6",
        "gray-light": "#d3dce6",
      },
    },
  },
  plugins: [],
};
export default config;

content[]

content: [
    "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
  ],

- Usage

Run command

nextinit

type your folder name; like widget >> Enter.

FINISH

1. Define custom Color ( can change one point to effect all )

onPrimary
onSecondary

  • In File tailwind.config.ts
theme: {
    extend: {
      backgroundImage: {
        "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
        "gradient-conic":
          "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
      },
      colors: {
        onPrimary: "#334155",
        onSecondary: '#64758B',
        onTertiary: '#64758B',
        onError: '#FF5349',
        background: "var(--background)",
        foreground: "var(--foreground)",
        blue: "#1fb6ff",
        pink: "#ff49db",
        orange: "#ff7849",
        green: "#13ce66",
        "gray-dark": "#273444",
        gray: "#8492a6",
        "gray-light": "#d3dce6",
      },
    },
  },
  plugins: [],

2. Define protocol and hostname in images / remotePatterns...

  • In File next.config.mjs

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    reactCompiler: true,
    ppr: 'incremental'
  },
  images: {
    remotePatterns: [
      {
        protocol:"https",
        hostname:"images.pexels.com"
      },
      {
        protocol:"https",
        hostname:"images.unsplash.com"
      }
    ]
  }
};

export default nextConfig;

Structure tree



src/
├── app/
│
├── components/ `mkdir components`
    │
    ├── widget/     // folder name that you create first.
        ├── button/
        │   ├── button_default.tsx
        │   └── button_learn_more.tsx
        ├── image/
        │   ├── image_content_fill_vertical.tsx
        │   ├── image_content_fill.tsx
        │   ├── image_icon_small.tsx
        │   ├── image_profile_extra_small.tsx
        │   ├── image_profile_medium.tsx
        │   └── image_profile_small.tsx
        ├── layout/
        │   ├── layout_card.tsx
        │   ├── layout_image_profile_title_medium.tsx
        │   ├── layout_image_profile_title.tsx
        │   ├── layout_special_image_title_description.tsx
        │   └── Layout_two_column_between.tsx
        ├── text/
        │   ├── text_base_bold.tsx
        │   ├── text_base_medium.tsx
        │   ├── text_base.tsx
        │   ├── text_extra_large_bold.tsx
        │   ├── text_extra_large_medium.tsx
        │   ├── text_extra_large.tsx
        │   ├── text_extra_small_bold.tsx
        │   ├── text_extra_small_medium.tsx
        │   ├── text_extra_small.tsx
        │   ├── text_large_bold.tsx
        │   ├── text_large_medium.tsx
        │   ├── text_large.tsx
        │   ├── text_small_bold.tsx
        │   ├── text_small_medium.tsx
        │   ├── text_small.tsx
        │   ├── text_two_extra_large_bold.tsx
        │   ├── text_two_extra_large_medium.tsx
        │   └── text_two_extra_large.tsx
        ├── widget/
        │   ├── profile/
        │   │   └── profile_card_widget.tsx
        │   └── list_image_caption_title_description_widget.tsx
            

Usage widget

<ProfileCardWidget />

profile_card.tsx

import ProfileCardWidget from "@/components/widget/widget/profile_card_widget";

export default function Home() {
  return (
    <div className="">
      <ProfileCardWidget
        coverImage="https://images.pexels.com/photos/26840789/pexels-photo-26840789.jpeg?auto=compress&cs=tinysrgb&w=1200&lazy=load"
        coverAlt="profile"
        profileImage="https://images.pexels.com/photos/23325663/pexels-photo-23325663.jpeg?auto=compress&cs=tinysrgb&w=1200&lazy=load"
        profileAlt="profile"
        name="Nell Abbott"
        followerCount="213"
        buttonTitle="My Profile"
      />
    </div>
  );
}

<ListImageCaptionTitleDescriptionWidget />

<ListImageCaptionTitleDescriptionWidget
  imageUrl="https://images.pexels.com/photos/19171623/pexels-photo-19171623.jpeg?auto=compress&cs=tinysrgb&w=1200&lazy=load"
  imageAlt="Somethings"
  caption="Isabel Obrien"
  title="9364ae85-2697-5e30-870a-1b483a7a25ce"
  description="movement attack concerned shaking charge grown exactly did event burst earth porch dirt dull cookies national gate air blue stuck son that biggest chose"
/>