
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@indec/react-commons
Advanced tools
A comprehensive React component library built with Tailwind CSS for INDEC (Instituto Nacional de Estadística y Censos) applications.
https://indec-it.github.io/react-commons/
npm install @indec/react-commons
Import the components you need from the library:
import { Button, Field, Modal, Header } from '@indec/react-commons';
A customizable button component with various styles and states.
import { Button } from '@indec/react-commons';
<Button onClick={handleClick} disabled={false}>
Click me
</Button>
An input field component with label, error handling, and tooltip support.
import { Field } from '@indec/react-commons';
<Field
name="email"
label="Email Address"
type="email"
placeholder="john@example.com"
error="Invalid email"
tooltip="Enter your work email"
onChange={handleChange}
onBlur={handleBlur}
/>
Props:
name - Field name attributelabel - Field labeltype - Input type (text, email, password, number, etc.)error - Error message to displaytooltip - Tooltip text (shows info icon)disabled - Disable the fieldonChange - Change handleronBlur - Blur handlerA responsive header component with navigation menu and user menu.
import { Header } from '@indec/react-commons';
<Header
token={userToken}
user={{name: 'John', lastName: 'Doe'}}
items={[
{name: 'Dashboard', path: 'dashboard'},
{name: 'Reports', path: 'reports'}
]}
onRedirect={handleNavigation}
onLogout={handleLogout}
/>
A fixed footer component that stays at the bottom of the page.
import { Footer } from '@indec/react-commons';
<Footer>
<p>© 2024 INDEC. All rights reserved.</p>
</Footer>
A flexible modal component with compound components for title, content, and buttons.
import { Modal } from '@indec/react-commons';
<Modal show={isOpen} onClose={handleClose}>
<Modal.Title title="Confirm Action" />
<Modal.Content>
<p>Are you sure you want to proceed?</p>
</Modal.Content>
<Modal.Buttons onClose={handleClose} />
</Modal>
A data table component with sorting, pagination, and loading states.
import { Table } from '@indec/react-commons';
<Table
columns={[
{key: 'id', label: 'ID'},
{key: 'name', label: 'Name'},
{key: 'email', label: 'Email'}
]}
rows={data}
page={1}
totalResults={100}
resultsPerPage={10}
onChangePage={handlePageChange}
onSort={handleSort}
isLoading={false}
showPagination={true}
/>
A pagination component for navigating through pages of data.
import { Pagination } from '@indec/react-commons';
<Pagination
page={currentPage}
totalPages={10}
onPageChange={handlePageChange}
/>
A notification component that displays temporary messages.
import { Snackbar } from '@indec/react-commons';
<Snackbar
open={showMessage}
message="Operation completed successfully"
type="success"
onClose={handleClose}
/>
A loading spinner component.
import { Loading } from '@indec/react-commons';
<Loading />
A component to display error messages consistently.
import { ErrorMessage } from '@indec/react-commons';
<ErrorMessage error="Something went wrong" />
The library includes 40+ icon components that can be imported individually:
import {
AddIcon,
DeleteIcon,
EditIcon,
SearchIcon,
UserIcon,
MenuIcon,
CloseIcon,
CheckCircleIcon,
ErrorIcon,
InfoIcon,
// ... and many more
} from '@indec/react-commons';
// Usage
<SearchIcon size={24} className="text-blue-600" />
All icons support the following props:
size - Icon size (default: 24)className - CSS classes for stylingArrowBackIcon, ArrowForwardIcon, ChevronLeftIcon, ChevronRightIcon, MenuIconAddIcon, DeleteIcon, EditIcon, SaveIcon, CloseIcon, SearchIconCheckCircleIcon, ErrorIcon, InfoIcon, HelpIconUserIcon, AccountCircleIcon, GroupIconAttachFileIcon, UploadFileIconA hook that provides responsive screen size information.
import { useScreenSize } from '@indec/react-commons';
function MyComponent() {
const { isMobile, isTablet, isDesktop } = useScreenSize();
return (
<div>
{isMobile && <MobileView />}
{isDesktop && <DesktopView />}
</div>
);
}
A utility function to calculate pagination parameters.
import { getPaginationFields } from '@indec/react-commons';
const { startIndex, endIndex } = getPaginationFields(currentPage, itemsPerPage, totalItems);
git clone https://github.com/indec-it/react-commons.git
cd react-commons
npm install
npm start
Storybook will open at http://localhost:6006
Build the library:
npm run build
Run tests:
npm test
Run tests with coverage:
npm run test:coverage
src/
components/ # React components
Button.jsx
Field.jsx
Header/
Icons/
Modal/
Table/
...
hooks/ # Custom React hooks
useScreenSize.js
utils/ # Utility functions
getPaginationFields.js
stories/ # Storybook stories
__tests__/ # Test files
styles.css # Global styles
index.js # Main export file
We welcome contributions! Please follow these steps:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)MIT License - see LICENSE.md for details
For issues and feature requests, please use the GitHub issues page.
FAQs
Common reactjs components for apps
We found that @indec/react-commons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

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.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.