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

swayamui

v1.0.23

Published

React UI component library

Downloads

70

Readme

Swayam UI React Component Library

Swayam UI is a collection of reusable React components that make building user interfaces easier. This documentation focuses on the available button components.

Installation

You can install Swayam UI using npm:

npm install swayamui

Documentation

Buttons

There are seven varieties of buttons available in Swayam UI:

  • Primary: A primary button for important actions.
  • Secondary: A secondary button for less important actions.
  • Info: An informational button.
  • Warn: A warning button for alerting users.
  • Delete: A button for delete actions.
  • Custom: A customizable button with a specified color.
  • Fancy: A fancy button with a unique style.

How to Use

To use these buttons,

import the desired button component and provide the required text prop.

For the 'ButtonCustom', you can also specify the 'color' color = 'any color' as second agrument

import React from 'react';
import {
  ButtonCustom,
  ButtonDelete,
  ButtonFancy,
  ButtonInfo,
  ButtonPrimary,
  ButtonSecondary,
  ButtonWarn,
} from 'swayamui';

function App() {
  return (
    <>
      <ButtonPrimary text='Primary' />
      <ButtonSecondary text='Secondary' />
      <ButtonInfo text='Info' />
      <ButtonWarn text='Warning' />
      <ButtonDelete text='Delete' />
      <ButtonCustom color='pink' text='Custom' />
      <ButtonFancy text='What ever!!' />
    </>
  );
}

export default App;

These buttons offer a variety of styles and can be customized to fit your application's design. Explore the different options to enhance your UI with Swayam UI components.

Navbar

The Navbar component in Swayam UI provides a customizable navigation bar for your web application. Here's how to use it:

Install react-router-dom if you haven't already. This package is commonly used for routing in React applications. You can install it using npm:

npm install react-router-dom

Import and wrap your App component with BrowserRouter from 'react-router-dom' in your main application file (usually index.js or App.js).

<BrowserRouter>
    <React.StrictMode>
        <App />
    </React.StrictMode>
</BrowserRouter>

How to Use

  1. Include the Navbar component in your React component, providing the following props:
  • menuItems: An array of menu items to display in the navigation bar.
  • color: The background color of the navigation bar.
<Navbar menuItems={["About", "Services", "Contact", "Developer"]} color={'#001d6b'}>
  Website Name
</Navbar>

NOTE - The routes for the navigation will be same as the names given in the array

  1. Include Path and Routes to give the navigation
<Routes>
    <Route path="/" element={<Outlet />}>
        <Route path="about" element={<About />} />
        <Route path="services" element={<Services />} />
        <Route path="contact" element={<Contact />} />
        <Route path="developer" element={<Developer />} />
    </Route>
</Routes>

NOTE - The Given JSX pages should be made before using this

Card

The Card1 component is designed to display content in a card-like format. It accepts the following props for customization:

  • imageUrl (string, required): The URL of the image to display in the card.

  • title (string, required): The main heading or title for the card.

  • subtitle (string, required): A subtitle or tagline for the card.

  • buttonText (string, required): The text for the button displayed in the card.

  • btnAction (function): Handling onClick event for the button.

Usage

To use the Card1 component, import it and pass the necessary props as shown in the example below:

import React from 'react';
import { Card1 } from 'swayamui';

function App() {
  return (
    <Card1
      imageUrl='https://miro.medium.com/v2/resize:fit:3840/1*xMuIOwjliGUPjkzukeWKfw.jpeg'
      title='Heading 1'
      subtitle='Tag Line tag Line tag Line tag Line tag Line tag Line tag Line tag Line tag Line tag Line'
      buttonText='Click Me!!'
    />
  );
}

export default App;

Thank You Stay Updated Adding More Features Shortly