New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

alterui

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alterui

Hi there! I'm Lakshya Rohilla, a BCA student and this is my side project. I would love if you use it and give me feedback on what I should improve in this project.

latest
Source
npmnpm
Version
1.0.17
Version published
Maintainers
1
Created
Source

🚀 AlterUI - A Lightweight React UI Library

Hi there! I'm Lakshya Rohilla, a BCA student and this is my side project. I would love if you use it and give me feedback on what I should improve in this project.

AlterUI is a simple and customizable React UI component library with reusable components like Buttons, Badges, Alerts, Loaders, Inputs, Modals, Cards, Tables, TextAreas, Footers, Checkboxes, Dividers, and Switch Buttons.

📥 Installation

AlterUI is available exclusively via npm:

npm install alterui

🔗 Usage

To use AlterUI components, import both the components and the CSS styles:

import { 
  Button, Badge, Loader, Alert, Input, Modal, Card, Table, TextArea, Footer, 
  Checkbox, Divider, SwitchButton 
} from 'alterui';
import 'alterui/dist/styles.css'; // Import the pre-built CSS

📚 Components

🔘 Button

A customizable button with different styles.

✅ Usage:

<Button variant="primary">Click Me</Button>
<Button variant="danger" gradient>Delete</Button>

✨ Props:

PropTypeDefaultDescription
variantstringprimaryButton color style
sizestringmdButton size (sm, md, lg)
gradientbooleanfalseApply a gradient background
roundedbooleantrueControl button border radius

🎖 Badge

Used to highlight statuses or labels.

✅ Usage:

<Badge variant="success">Active</Badge>
<Badge variant="danger" size="lg">Error</Badge>

✨ Props:

PropTypeDefaultDescription
variantstringgrayBadge color style
sizestringmdBadge size (sm, md, lg)
roundedstringmdBorder radius (none, md, full)

⚠️ Alert

Displays messages for user notifications.

✅ Usage:

<Alert variant="warning" dismissible>⚠️ Warning: This action is irreversible!</Alert>

✨ Props:

PropTypeDefaultDescription
variantstringinfoAlert type (success, warning, danger, info)
dismissiblebooleanfalseAllows the alert to be closed

🔄 Loader (Spinner)

Indicates loading state.

✅ Usage:

<Loader size="lg" color="success" />

✨ Props:

PropTypeDefaultDescription
sizestringmdLoader size (sm, md, lg)
colorstringprimaryLoader color style

📝 TextArea

Customizable multi-line text input.

✅ Usage:

<TextArea placeholder="Write your message..." />
<TextArea rows={5} size="lg" variant="success" placeholder="Success message" />

✨ Props:

PropTypeDefaultDescription
rowsnumber3Number of rows in textarea
sizestringmdTextarea size (sm, md, lg)
variantstringdefaultStyling variant (default, success, error, warning)
fullWidthbooleanfalseMakes the textarea full width

🔲 Modal

A pop-up dialog for user actions.

✅ Usage:

<Modal isOpen={true} onClose={() => setIsOpen(false)} title="Example Modal">
  <p>This is a modal</p>
</Modal>

✨ Props:

PropTypeDefaultDescription
isOpenbooleanfalseControls modal visibility
titlestringModal TitleTitle of the modal
onClosefunctionnullFunction to close modal

📦 Card

A reusable container for content.

✅ Usage:

<Card 
  image="https://via.placeholder.com/300"
  title="Beautiful Sunset"
  description="A breathtaking view of the sun setting over the mountains."
  footer={<button className="bg-blue-500 text-white px-4 py-2 rounded">Learn More</button>}
/>

✨ Props:

PropTypeDefaultDescription
imagestringnullImage URL
titlestringnullCard title
descriptionstringnullCard description
footernodenullFooter content (buttons, links, etc.)

📊 Table

A responsive table for structured data.

✅ Usage:

const columns = [
  { header: "ID", key: "id" },
  { header: "Name", key: "name" },
  { header: "Age", key: "age" }
];

const data = [
  { id: 1, name: "John Doe", age: 28 },
  { id: 2, name: "Jane Smith", age: 34 }
];

<Table columns={columns} data={data} variant="striped" />

✨ Props:

PropTypeDefaultDescription
columnsarray[]Defines table headers
dataarray[]Table data rows
variantstringdefaultTable styling (default, striped, bordered, hover)

🔲 Checkbox (New)

A simple checkbox component.

✅ Usage:

<Checkbox label="Accept Terms" checked={true} onChange={() => {}} />

✨ Props:

PropTypeDefaultDescription
labelstring""Label text for the checkbox
checkedbooleanfalseWhether the checkbox is checked
onChangefunctionnullFunction triggered on change

➖ Divider (New)

A simple divider line.

✅ Usage:

<Divider />
<Divider orientation="vertical" dashed color="gray-400" />

✨ Props:

PropTypeDefaultDescription
orientationstringhorizontalCan be horizontal or vertical
colorstringgray-300Color of the divider
dashedbooleanfalseWhether the divider is dashed

🔘 Switch Button (New)

A toggle switch.

✅ Usage:

<SwitchButton isOn={true} onToggle={() => {}} />

✨ Props:

PropTypeDefaultDescription
isOnbooleanfalseWhether the switch is on
onTogglefunctionnullFunction triggered on toggle

📄 License

AlterUI is free to use but remains a private library. Redistribution or modification without permission is not allowed.

This updated README includes your Checkbox, Divider, and SwitchButton components. Let me know if you need any further refinements! 🚀

Keywords

Ui Lib

FAQs

Package last updated on 30 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts