
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@metadiv-studio/auth-layout-001
Advanced tools
A React component library providing a flexible authentication layout with theme support and customizable header/footer sections.
A React component library providing a flexible authentication layout with theme support and customizable header/footer sections.
npm i @metadiv-studio/auth-layout-001
This package provides a comprehensive authentication layout component designed for login, signup, and other authentication-related pages. It features:
This package requires the following peer dependencies:
react ^18react-dom ^18And includes the following dependencies:
@metadiv-studio/button - Button component with theme support@metadiv-studio/theme-context - Theme context providerlucide-react - Icon libraryimport AuthLayout from '@metadiv-studio/auth-layout-001';
function LoginPage() {
return (
<AuthLayout title={<h1 className="text-xl font-bold">Login</h1>}>
<div className="p-6">
<form>
<input type="email" placeholder="Email" className="w-full p-2 mb-4 border rounded" />
<input type="password" placeholder="Password" className="w-full p-2 mb-4 border rounded" />
<button type="submit" className="w-full p-2 bg-blue-500 text-white rounded">
Sign In
</button>
</form>
</div>
</AuthLayout>
);
}
import AuthLayout from '@metadiv-studio/auth-layout-001';
function SignupPage() {
return (
<AuthLayout
title={<h1 className="text-xl font-bold">Create Account</h1>}
headerLeft={<img src="/logo.png" alt="Logo" className="h-8" />}
headerCenter={<nav className="text-sm">Navigation Menu</nav>}
headerRight={<span className="text-sm">Help</span>}
footerLeft={<span className="text-xs">Β© 2024 Company</span>}
footerCenter={<span className="text-xs">Privacy Policy | Terms</span>}
footerRight={<span className="text-xs">Contact Us</span>}
>
<div className="p-6">
<form>
<input type="text" placeholder="Full Name" className="w-full p-2 mb-4 border rounded" />
<input type="email" placeholder="Email" className="w-full p-2 mb-4 border rounded" />
<input type="password" placeholder="Password" className="w-full p-2 mb-4 border rounded" />
<button type="submit" className="w-full p-2 bg-green-500 text-white rounded">
Create Account
</button>
</form>
</div>
</AuthLayout>
);
}
import AuthLayout from '@metadiv-studio/auth-layout-001';
function WelcomePage() {
return (
<AuthLayout
title={<h1 className="text-2xl font-bold">Welcome</h1>}
backgroundImage="https://example.com/background.jpg"
>
<div className="p-6 text-center">
<p className="mb-4">Welcome to our platform!</p>
<button className="px-6 py-2 bg-blue-500 text-white rounded">
Get Started
</button>
</div>
</AuthLayout>
);
}
import AuthLayout from '@metadiv-studio/auth-layout-001';
function DocumentViewer() {
return (
<AuthLayout
pdfMode={true}
pdfUrl="https://example.com/document.pdf"
headerLeft={<button>β Back</button>}
headerRight={<button>Download</button>}
/>
);
}
import { ThemeProvider } from '@metadiv-studio/theme-context';
import AuthLayout from '@metadiv-studio/auth-layout-001';
function App() {
return (
<ThemeProvider>
<AuthLayout title={<h1>Themed Layout</h1>}>
<div className="p-6">
{/* The theme toggle button is automatically included in the layout header */}
<p>This layout supports automatic theme switching!</p>
</div>
</AuthLayout>
</ThemeProvider>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
title | React.ReactNode | undefined | Title content displayed in the auth card header |
children | React.ReactNode | Required | Main content of the auth card |
headerLeft | React.ReactNode | undefined | Content for the left section of the page header |
headerCenter | React.ReactNode | undefined | Content for the center section of the page header |
headerRight | React.ReactNode | undefined | Content for the right section of the page header |
footerLeft | React.ReactNode | undefined | Content for the left section of the page footer |
footerCenter | React.ReactNode | undefined | Content for the center section of the page footer |
footerRight | React.ReactNode | undefined | Content for the right section of the page footer |
backgroundImage | string | undefined | URL of the background image |
pdfMode | boolean | false | Enable PDF viewer mode |
pdfUrl | string | undefined | URL of the PDF to display (required when pdfMode is true) |
The AuthLayout creates a full-screen fixed layout with the following structure:
βββββββββββββββββββββββββββββββββββββββββββ
β Header (24 units high) β
β [Left] [Center (grows)] [Right] β
βββββββββββββββββββββββββββββββββββββββββββ€
β β
β Main Content Area (grows) β
β βββββββββββββββββββ β
β β Auth Card β (centered) β
β β (480x455px) β β
β β β β
β βββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββ€
β Footer (24 units high) β
β [Left] [Center (grows)] [Right] β
βββββββββββββββββββββββββββββββββββββββββββ
The component uses Tailwind CSS classes and supports custom theme variables:
bg-bgc-lv1: Background color level 1 (auth card background)bg-bgc-lv3: Background color level 3 (page background)text-txtc-lv1: Text color level 1dark:border-white/10: Dark mode border stylingMake sure to include the package in your Tailwind CSS configuration:
// tailwind.config.js
module.exports = {
content: [
// ... other content paths
"./node_modules/@metadiv-studio/**/*.{js,ts,jsx,tsx}",
],
// ... rest of config
}
This package includes full TypeScript definitions. All props are typed, and you'll get full IntelliSense support in your IDE.
import AuthLayout from '@metadiv-studio/auth-layout-001';
// All props are fully typed
const MyComponent = () => (
<AuthLayout
title="Login" // β
string | ReactNode
pdfMode={true} // β
boolean
// TypeScript will catch any invalid props
>
<div>Content</div>
</AuthLayout>
);
UNLICENSED
Built with β€οΈ by Metadiv Studio
FAQs
A React component library providing a flexible authentication layout with theme support and customizable header/footer sections.
We found that @metadiv-studio/auth-layout-001 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 2 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
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated βelf-*β npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.