🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis β†’
Socket
Book a DemoInstallSign in
Socket

@metadiv-studio/auth-layout-001

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metadiv-studio/auth-layout-001

A React component library providing a flexible authentication layout with theme support and customizable header/footer sections.

latest
npmnpm
Version
0.1.11
Version published
Maintainers
2
Created
Source

@metadiv-studio/auth-layout-001

A React component library providing a flexible authentication layout with theme support and customizable header/footer sections.

πŸš€ Installation

npm i @metadiv-studio/auth-layout-001

πŸ“‹ Description

This package provides a comprehensive authentication layout component designed for login, signup, and other authentication-related pages. It features:

  • Responsive Design: Fixed full-screen layout that adapts to all screen sizes
  • Theme Support: Built-in dark/light mode toggle with theme context integration
  • Customizable Header/Footer: Flexible header and footer sections with left, center, and right content areas
  • Background Image Support: Optional background image overlay
  • PDF Mode: Special mode for displaying PDF documents in a viewer
  • TypeScript Support: Full TypeScript definitions included
  • Tailwind CSS: Styled with Tailwind CSS for easy customization

🎯 Dependencies

This package requires the following peer dependencies:

  • react ^18
  • react-dom ^18

And includes the following dependencies:

  • @metadiv-studio/button - Button component with theme support
  • @metadiv-studio/theme-context - Theme context provider
  • lucide-react - Icon library

πŸ“– Usage

Basic Usage

import 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>
  );
}

With Background Image

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>
  );
}

PDF Viewer Mode

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>}
    />
  );
}

With Theme Context

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>
  );
}

🎨 Props

AuthLayout Props

PropTypeDefaultDescription
titleReact.ReactNodeundefinedTitle content displayed in the auth card header
childrenReact.ReactNodeRequiredMain content of the auth card
headerLeftReact.ReactNodeundefinedContent for the left section of the page header
headerCenterReact.ReactNodeundefinedContent for the center section of the page header
headerRightReact.ReactNodeundefinedContent for the right section of the page header
footerLeftReact.ReactNodeundefinedContent for the left section of the page footer
footerCenterReact.ReactNodeundefinedContent for the center section of the page footer
footerRightReact.ReactNodeundefinedContent for the right section of the page footer
backgroundImagestringundefinedURL of the background image
pdfModebooleanfalseEnable PDF viewer mode
pdfUrlstringundefinedURL of the PDF to display (required when pdfMode is true)

🎯 Layout Structure

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]         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎨 Styling

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 1
  • dark:border-white/10: Dark mode border styling

Make 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
}

πŸ› οΈ TypeScript Support

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>
);

πŸ“„ License

UNLICENSED

Built with ❀️ by Metadiv Studio

FAQs

Package last updated on 23 Sep 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