
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
sweetpagination
Advanced tools
SweetPagination is a lightweight, responsive, and customizable React pagination component library. Works seamlessly with React, Next.js, and JavaScript projects. Ideal for tables, lists, data grids, and UI components. Supports hooks, modern design, and fu
SweetPagination is a lightweight, responsive, and customizable React pagination component. It works seamlessly with React, Next.js, and JavaScript projects. Ideal for tables, lists, data grids, and UI components. Fully responsive, accessible, and easy to integrate.
style-1
, style-2
)
Install via npm:
npm i sweetpagination --save
import React, { useState } from "react";
import SweetPagination from "sweetpagination";
function Items() {
const [currentPageData, setCurrentPageData] = useState([]);
const items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
return (
<div>
{currentPageData.map((item) => (
<div key={item}>
<h3>Item #{item}</h3>
</div>
))}
<SweetPagination
currentPageData={setCurrentPageData}
getData={items}
/>
</div>
);
}
Prop | Type | Default | Description |
---|---|---|---|
dataPerPage | Number | 10 | Number of items per page |
getData | Array | [] | Array of data to paginate |
currentPageData | Function | - | Callback function to get current page data |
navigation | Boolean | true | Show Previous/Next navigation buttons |
getStyle | String | 'style-1' | Preloaded styles: style-1 , style-2 , or style-custom |
<SweetPagination
currentPageData={setCurrentPageData}
getData={items}
dataPerPage={10}
/>
<SweetPagination
currentPageData={setCurrentPageData}
getData={items}
dataPerPage={10}
navigation={true}
/>
style-1
– Modern round buttons with hover effectsstyle-2
– Minimal flat design<SweetPagination
currentPageData={setCurrentPageData}
getData={items}
dataPerPage={10}
navigation={true}
getStyle={'style-1'}
/>
You can also create your own custom style:
<SweetPagination
currentPageData={setCurrentPageData}
getData={items}
dataPerPage={10}
navigation={true}
getStyle={'style-custom'}
/>
Add your custom CSS:
.style-custom {
background-color: #4caf50;
color: white;
border-radius: 12px;
transition: all 0.3s ease;
}
.style-custom:hover {
background-color: #45a049;
transform: scale(1.05);
}
SweetPagination automatically adjusts for mobile devices. Works on all screen sizes, from desktop to mobile.
MIT © Jahidul Islam Zim All rights reserved.
FAQs
SweetPagination is a lightweight, responsive, and customizable React pagination component library. Works seamlessly with React, Next.js, and JavaScript projects. Ideal for tables, lists, data grids, and UI components. Supports hooks, modern design, and fu
The npm package sweetpagination receives a total of 216 weekly downloads. As such, sweetpagination popularity was classified as not popular.
We found that sweetpagination demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.