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

@oneslash/designsystem

v1.0.2

Published

A reusable UI components built with TailwindCSS and React.

Downloads

1

Readme

Design System

A reusable design system based on TailwindCSS and React, designed to provide a consistent UI for applications. This package includes a variety of components such as buttons, checkboxes, tags, and more, which can be easily integrated and customized within your project.

Installation

Install the package via npm:

npm install @oneslash/designsystem

or using yarn:

yarn add @oneslash/designsystem

Usage

To use the components in your project, simply import them. Here’s an example of how to use the Button component:

import { Button } from '@oneslash/designsystem';

const App = () => (
  <Button
    label="Click Me"
    type="primary"
    size="medium"
    onClickButton={() => alert('Button Clicked!')}
  />
);

export default App;

Components

  • Button: A button component with customizable types, sizes, icons, and actions.
  • Checkbox: A custom checkbox component for selecting options.
  • Tag: A component to display tags or labels.
  • IconButton: A button component with only an icon.
  • Popover: A component for rendering popover menus.

Props for Button

| Prop | Type | Description | |------------------|----------|----------------------------------------------------------| | label | string | Text displayed on the button. | | type | string | Button type: primary, secondary, tertiary, textOnly. | | size | string | Button size: small, medium, large. | | onClickButton | function | Function to call on button click. | | decoIcon | string | Name of the icon on the left side of the button. | | actionIcon | string | Name of the icon on the right side of the button. |

Customization

The design system uses TailwindCSS for styling, making it easy to customize components through Tailwind utility classes.

Example: Customizing a Button

<Button
  label="Save"
  type="primary"
  size="large"
  onClickButton={() => console.log('Save clicked')}
  className="bg-blue-500 text-white hover:bg-blue-600"
/>

Build and Development

To build the design system locally:

  1. Clone the repository.
  2. Run the following commands:
npm install
npm run build

Contributing

Feel free to contribute to this project by creating issues or submitting pull requests. When contributing, please ensure the code follows the structure and coding standards defined in the project.

License

This project is licensed under the MIT License.

Contact

For any questions or feedback, reach out to the maintainer at [email protected].


### Explanation:
- **Installation**: Instructions to install the package via npm or yarn.
- **Usage**: Example code showing how to import and use the components.
- **Components**: Lists the components included in the design system with a focus on the `Button` component.
- **Customization**: Shows how to customize components using TailwindCSS.
- **Build and Development**: Steps to build the project locally.
- **License**: Indicates the project license (e.g., MIT). You’ll need to create a `LICENSE` file for it to link properly.

This file serves as documentation and is automatically displayed on the npm package page when your package is published. It also helps users understand how to install, use, and contribute to your design system.