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

dry-components

v1.1.0

Published

A lightweight React component library built with Tailwind CSS for styling. This library contains a collection of reusable components, making it easy to integrate into your projects.

Downloads

10

Readme

dry-components

A lightweight React component library built with Tailwind CSS for styling. This library contains a collection of reusable components, making it easy to integrate into your projects.

Features

  • Built using JSX
  • Styled with Tailwind CSS
  • Simple and reusable component structure
  • Customizable with Tailwind CSS classes

Installation

First, install the library via npm:

npm install dry-components

Usage

To use any component from the library, import it into your project like so:

import { Input } from 'dry-components';
import { TextArea } from 'dry-components';
import { SelectInput } from 'dry-components';
import { PrimaryButton } from 'dry-components';

Input Component Props

| Prop Name | Type | Required | Description | |-------------|----------|----------|-----------------------------------------------------------------------------------------------------------| | value | string | Yes | The current value of the input field. | | name | string | Yes | The name of the input field. Typically used for form handling. | | type | string | Yes | The type of the input (e.g., text, password, email, etc.). | | handleChange | function | Yes | The function to handle the change event for the input field. | | width | string | No | Optional width of the input container, default is w-full. Accepts Tailwind CSS width classes. | | label | string | No | Placeholder text for the input field. If not provided, the placeholder will be empty. |

TextArea Component Props

| Prop Name | Type | Required | Description | |-------------|----------|----------|-----------------------------------------------------------------------------------------------------------| | value | string | Yes | The current value of the text area. | | name | string | Yes | The name of the text area. Typically used for form handling. | | type | string | No | The type of the text area (not commonly used for textarea, but included for consistency). | | handleChange | function | Yes | The function to handle the change event for the text area. | | width | string | No | Optional width of the text area container, default is w-full. Accepts Tailwind CSS width classes. | | label | string | No | Placeholder text for the text area. If not provided, the placeholder will be empty. | | rows | number | No | Number of visible text lines. Defaults to 5. |

SelectInput Component Props

| Prop Name | Type | Required | Description | |-------------|------------|----------|-----------------------------------------------------------------------------------------------------------| | value | string | Yes | The current value of the selected option. | | name | string | Yes | The name of the select input. Typically used for form handling. | | options | Array<{ value: string, label: string }> | Yes | Array of option objects where each object has a value and a label property. | | handleChange | function | Yes | The function to handle the change event for the select input. | | width | string | No | Optional width of the select input container, default is w-full. Accepts Tailwind CSS width classes. | | label | string | No | Placeholder text for the select input. This will be shown as a disabled option when no option is selected. |

PrimaryButton Component Props

| Prop Name | Type | Required | Description | |-----------|----------|----------|--------------------------------------------------------------------------------------------------| | label | string | Yes | The text to display inside the button. | | onClick | function | Yes | The function to call when the button is clicked. | | width | string | No | Optional width of the button container, default is w-fit. Accepts Tailwind CSS width classes. | | variant | string | No | The button style variant. Options include outlined and default (filled). |