Component split-login-card-demo
not found in registry.
Installation
Usage
import SplitLoginCard from "@/components/ruixen/split-login-card";
export default function App() {
const handleChange = (values: Record<string, string>) => {
console.log("Form values:", values);
};
const handleSubmit = (values: Record<string, string>) => {
console.log("Login attempt:", values);
};
return (
<SplitLoginCard
title="Welcome to RuixenUI"
description="Build beautiful interfaces with our component library"
imageSrc="https://your-logo-url.com/logo.png"
inputs={[
{
id: "email",
type: "email",
placeholder: "you@example.com",
label: "Email",
},
{
id: "password",
type: "password",
placeholder: "********",
label: "Password",
},
]}
buttonLabel="Sign In"
onChange={handleChange}
onSubmit={handleSubmit}
/>
);
}
Props
Prop | Type | Default | Description |
---|---|---|---|
title | string | "Welcome Back!" | Left side title |
description | string | Default description | Left side description text |
imageSrc | string | Default logo URL | Left side image/logo URL |
inputs | InputField[] | Email/password fields | Form input configuration |
onChange | (values: Record<string, string>) => void | - | Input change handler |
onSubmit | (values: Record<string, string>) => void | - | Form submit handler |
buttonLabel | string | "Login" | Submit button text |
className | string | - | Additional CSS classes |
Features
- Split Layout: Branded left side, form on right
- Responsive Design: Stacks on mobile, side-by-side on desktop
- Brand Integration: Custom logo and messaging
- Professional Look: Modern corporate appearance
- Flexible Content: Customizable branding content
- Form Validation: Built-in input validation
- Dark Mode Support: Automatic theme adaptation
Input Configuration
export interface InputField {
id: string;
type: string;
placeholder?: string;
label?: string;
}
Layout Structure
- Left Side (50%):
- Brand color background
- Company title and description
- Logo/illustration
- Right Side (50%):
- Clean white background
- Login form
- Submit button
Responsive Behavior
- Desktop: Side-by-side layout
- Mobile: Stacked layout (branding top, form bottom)
- Tablet: Maintains side-by-side with adjusted proportions
Use Cases
Perfect for:
- Corporate Applications: Professional brand presence
- SaaS Platforms: Marketing-integrated login
- Enterprise Software: Branded authentication
- B2B Applications: Professional user experience
- Product Demos: Showcase brand while authenticating