// 1. Get document info
const docInfo = await get_document_info();
// 2. Create main screen frame
const screen = await create_frame({
x: 0,
y: 0,
width: 375,
height: 812,
name: "Login Screen",
fillColor: { r: 0.95, g: 0.95, b: 0.95, a: 1 }
});
// 3. Create logo container
const logoContainer = await create_frame({
x: 20,
y: 80,
width: 335,
height: 100,
name: "Logo Container",
parentId: screen.id
});
// 4. Add welcome text
const welcomeText = await create_text({
x: 20,
y: 220,
text: "Welcome Back",
fontSize: 28,
fontWeight: 700,
name: "Welcome Text",
parentId: screen.id
});
// 5. Create input container
const inputContainer = await create_frame({
x: 20,
y: 280,
width: 335,
height: 140,
name: "Input Container",
parentId: screen.id
});
// 6. Create email input with label
const emailInput = await create_frame({
x: 0,
y: 0,
width: 335,
height: 60,
name: "Email Input",
parentId: inputContainer.id,
fillColor: { r: 1, g: 1, b: 1, a: 1 },
strokeColor: { r: 0.8, g: 0.8, b: 0.8, a: 1 },
strokeWeight: 1
});
const emailLabel = await create_text({
x: 12,
y: 20,
text: "Email",
fontSize: 14,
name: "Email Label",
parentId: emailInput.id
});
// 7. Create login button
const loginButton = await create_frame({
x: 20,
y: 440,
width: 335,
height: 50,
name: "Login Button",
parentId: screen.id,
fillColor: { r: 0.2, g: 0.4, b: 1, a: 1 }
});
const buttonText = await create_text({
x: 140,
y: 15,
text: "Log In",
fontSize: 16,
fontWeight: 600,
fontColor: { r: 1, g: 1, b: 1, a: 1 },
name: "Button Text",
parentId: loginButton.id
});