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

mich-pages

v0.0.22

Published

A React Page to easily generate create, view, update and delete pages for react using just a few lines of code.

Readme

Mich Pages

A React library for easily generating create, view, update and delete pages using just a few lines of code.

Features

  • 🚀 Quick Setup: Generate complete CRUD pages with minimal configuration
  • 🎨 Beautiful UI: Pre-styled components with modern design
  • 📱 Responsive: Works perfectly on desktop and mobile devices
  • 🎯 TypeScript: Full TypeScript support with type definitions
  • 🎨 Tailwind CSS: Built with Tailwind CSS for easy customization
  • 📝 Rich Text Editor: WYSIWYG editor powered by Quill
  • 📁 File Upload: Support for multiple file types and image uploads
  • 🔧 Customizable: Highly configurable components and styling

Installation

npm install mich-pages
# or
yarn add mich-pages
# or
pnpm add mich-pages

CSS Import

Import the styles in your main application file:

// Import the complete CSS bundle
import 'mich-pages/style';

Or import the main package which includes styles:

import 'mich-pages';

Quick Start

Basic Input Components

import { Input, SelectInput, FileInput } from 'mich-pages';

function MyForm() {
  return (
    <div>
      <Input
        label="Name"
        placeholder="Enter your name"
        type="text"
        required
        onChange={(value) => console.log(value)}
      />
      
      <SelectInput
        label="Category"
        placeholder="Choose a category"
        options={[
          { label: "Technology", value: "tech" },
          { label: "Design", value: "design" }
        ]}
        onChange={(value) => console.log(value)}
      />
      
      <FileInput
        label="Upload Files"
        accept="image/*,.pdf"
        multiple
        onChange={(files) => console.log(files)}
      />
    </div>
  );
}

Complete Page Components

import { NewCreatePage, NewViewPage, NewSubmitPage } from 'mich-pages';

const pageConfig = {
  title: "User Management",
  description: "Create and manage user accounts",
  categories: [
    { label: "Admin", value: "admin" },
    { label: "User", value: "user" }
  ],
  onSubmit: (data) => {
    console.log('Form submitted:', data);
    // Handle form submission
  },
  onCancel: () => {
    console.log('Form cancelled');
    // Handle cancellation
  },
  fields: [
    {
      type: "text",
      label: "Full Name",
      placeholder: "Enter full name",
      required: true
    },
    {
      type: "email",
      label: "Email Address",
      placeholder: "Enter email address",
      required: true
    },
    {
      type: "select",
      label: "Role",
      options: [
        { label: "Admin", value: "admin" },
        { label: "User", value: "user" }
      ]
    }
  ]
};

function App() {
  return (
    <div>
      {/* Create Page */}
      <NewCreatePage {...pageConfig} />
      
      {/* View Page */}
      <NewViewPage {...pageConfig} />
      
      {/* Submit Page */}
      <NewSubmitPage {...pageConfig} />
    </div>
  );
}

Rich Text Editor

import { PresetQuillEditor } from 'mich-pages';

function MyEditor() {
  return (
    <PresetQuillEditor
      value=""
      onChange={(value) => console.log(value)}
      placeholder="Start writing your content..."
    />
  );
}

Styled Button

import { StyledButton } from 'mich-pages';

function MyButtons() {
  return (
    <div>
      <StyledButton 
        variant="primary" 
        onClick={() => console.log('Primary clicked')}
      >
        Primary Button
      </StyledButton>
      
      <StyledButton 
        variant="secondary" 
        onClick={() => console.log('Secondary clicked')}
      >
        Secondary Button
      </StyledButton>
    </div>
  );
}

Available Components

Input Components

  • Input - Text input with validation
  • SelectInput - Dropdown select
  • SelectInput2 - Alternative select variant
  • SelectInput3 - Enhanced select variant
  • FileInput - File upload component
  • PresetQuillEditor - Rich text editor

Page Components

  • NewCreatePage - Complete create form page
  • NewViewPage - Display page for viewing records
  • NewSubmitPage - Submission page with processing states
  • NewPage - Generic page component
  • NewPageUi - UI-only page component

Utility Components

  • StyledButton - Pre-styled button with variants

TypeScript Support

All components include full TypeScript definitions:

import { InputI, SelectI, PageI } from 'mich-pages';

const inputConfig: InputI = {
  label: "Sample Input",
  placeholder: "Enter text...",
  type: "text",
  required: true,
  onChange: (value: string) => console.log(value),
  value: ""
};

Styling

The package uses Tailwind CSS for styling. You can customize the appearance by:

  1. Overriding CSS Variables:
:root {
  --primary: #your-primary-color;
  --gray-3: #your-gray-color;
  --white-color: #your-white-color;
}
  1. Using Tailwind Classes: All components accept className props for additional styling.

  2. Custom CSS: Import the styles and override specific classes as needed.

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

v0.0.19

  • Added CSS export support
  • Improved TypeScript definitions
  • Enhanced component documentation
  • Added comprehensive styling system

v0.0.18

  • Initial release
  • Basic CRUD components
  • Input components
  • Page components