
Security News
pnpm 11.10 Hardens Registry Authentication to Block Token Redirection
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.
@mkgalaxy/gen-next
Advanced tools
A comprehensive library of reusable React components, hooks, and utilities for Next.js and React.js applications.
npm install @my-stack/gen-next
# or
yarn add @my-stack/gen-next
# or
pnpm add @my-stack/gen-next
import { Button, Card, Input, Container } from '@my-stack/gen-next';
// or import from specific path
import { Button } from '@my-stack/gen-next/components';
function App() {
return (
<Container maxWidth="lg">
<Card variant="elevated" padding="lg">
<h1>Welcome</h1>
<Input label="Email" type="email" placeholder="Enter your email" fullWidth />
<Button variant="primary" size="md" fullWidth>
Submit
</Button>
</Card>
</Container>
);
}
import { useLocalStorage, useDebounce, useMediaQuery } from '@my-stack/gen-next';
// or import from specific path
import { useLocalStorage } from '@my-stack/gen-next/hooks';
function MyComponent() {
const [theme, setTheme] = useLocalStorage('theme', 'light');
const [searchTerm, setSearchTerm] = useState('');
const debouncedSearch = useDebounce(searchTerm, 500);
const isMobile = useMediaQuery('(max-width: 768px)');
return (
<div>
<p>Current theme: {theme}</p>
<p>Device: {isMobile ? 'Mobile' : 'Desktop'}</p>
<input value={searchTerm} onChange={(e) => setSearchTerm(e.target.value)} />
<p>Debounced: {debouncedSearch}</p>
</div>
);
}
import { formatDate, formatCurrency, isValidEmail, debounce, deepClone } from '@my-stack/gen-next';
// or import from specific path
import { formatDate } from '@my-stack/gen-next/utils';
// Format utilities
const formattedDate = formatDate(new Date(), 'en-US', { dateStyle: 'long' });
const price = formatCurrency(1234.56, 'USD');
// Validation
const isValid = isValidEmail('user@example.com');
// Object utilities
const cloned = deepClone({ a: 1, b: { c: 2 } });
// Async utilities
const debouncedFn = debounce(() => console.log('Hello'), 500);
Versatile button component with multiple variants and sizes.
Props:
variant: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger'size: 'sm' | 'md' | 'lg'disabled: booleanfullWidth: booleanisLoading: booleanFlexible container for grouping content.
Props:
variant: 'default' | 'bordered' | 'elevated'padding: 'none' | 'sm' | 'md' | 'lg'hoverable: booleanText input with label, error, and helper text support.
Props:
label: stringerror: stringhelperText: stringfullWidth: booleanCentered container with max-width constraints.
Props:
maxWidth: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full'padding: booleanManage state synchronized with localStorage.
const [value, setValue] = useLocalStorage<T>(key: string, initialValue: T);
Debounce a value.
const debouncedValue = useDebounce<T>(value: T, delay: number);
Track window dimensions.
const { width, height } = useWindowSize();
Responsive design with media queries.
const matches = useMediaQuery(query: string);
Boolean toggle state.
const [value, toggle, setValue] = useToggle(initialValue?: boolean);
formatDate(date, locale?, options?) - Format datesformatCurrency(amount, currency?, locale?) - Format currencyformatNumber(num, locale?) - Format numberstruncateString(str, maxLength?, suffix?) - Truncate stringscapitalize(str) - Capitalize first lettertitleCase(str) - Convert to title caseisValidEmail(email) - Validate email addressesisValidUrl(url) - Validate URLsisEmpty(str) - Check if string is emptyisValidPhone(phone) - Validate phone numbersdeepClone<T>(obj) - Deep clone objectsdeepMerge<T>(target, source) - Deep merge objectspick<T, K>(obj, keys) - Pick propertiesomit<T, K>(obj, keys) - Omit propertiesdebounce(func, wait) - Create debounced functionthrottle(func, limit) - Create throttled functionsleep(ms) - Async sleepretry(fn, maxRetries?, delay?) - Retry with exponential backoffnpm run build
npm run dev
npm run type-check
npm run lint
MIT
FAQs
Shared components and utilities for Next.js and React.js applications
The npm package @mkgalaxy/gen-next receives a total of 1 weekly downloads. As such, @mkgalaxy/gen-next popularity was classified as not popular.
We found that @mkgalaxy/gen-next 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.

Security News
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.

Security News
/Research
Socket uncovered 17 malicious npm and PyPI packages typosquatting Paysafe, Skrill, and Neteller SDKs to steal developer secrets.

Security News
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.