Learn how to use Pocket Code's drag & drop visual designer to build user interfaces for React, Flutter and native apps.
The Visual Designer is one of the most powerful features in Pocket Code. It lets you create user interfaces visually and automatically generates clean, production-ready code.
Designing UIs on a phone screen can be challenging. Writing layout code manually is slow and error-prone on small screens. The visual designer solves this with an intuitive drag & drop interface.
The designer is divided into:
| Component | Description |
|---|---|
| Container | Flexible container |
| Row | Horizontal elements |
| Column | Vertical elements |
| Grid | CSS Grid layout |
| Stack | Overlapping elements |
| Scroll | Scrollable area |
| Component | Description |
|---|---|
| Button | Button with variants |
| TextInput | Text field |
| Toggle | On/Off switch |
| Slider | Value selector |
| Dropdown | Dropdown menu |
| Checkbox | Checkbox |
| RadioGroup | Radio options |
| Component | Description |
|---|---|
| Text | Text with styles |
| Image | Images/icons |
| Card | Information card |
| List | Dynamic list |
| Badge | Notification badge |
| Avatar | Profile image |
| Divider | Visual separator |
| Component | Description |
|---|---|
| NavBar | Top navigation bar |
| TabBar | Tab navigation |
| Drawer | Side menu |
| BottomNav | Bottom navigation |
| Breadcrumb | Hierarchical navigation |
Let's create a complete login screen step by step:
Drag a Column to the canvas and configure:
Inside the column, drag an Image:
Add two TextInput components:
Email:
Password:
Drag a Button:
Add Text components for:
The designer automatically produces clean code:
// React output
export function LoginScreen() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
return (
<div className="flex flex-col items-center justify-center min-h-screen bg-neutral-950 p-6">
<img src="/logo.png" alt="Logo" className="w-30 h-30 rounded-full mb-8" />
<input
type="email"
placeholder="Email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="w-full p-3 mb-4 bg-neutral-900 rounded-xl
border border-neutral-800 text-white"
/>
<input
type="password"
placeholder="Password"
value={password}
onChange={(e) => setPassword(e.target.value)}
className="w-full p-3 mb-6 bg-neutral-900 rounded-xl
border border-neutral-800 text-white"
/>
<button
className="w-full p-3 bg-blue-600 rounded-xl
text-white font-semibold hover:bg-blue-700"
>
Log In
</button>
<p className="mt-4 text-neutral-500 text-sm">
Don't have an account? <span className="text-blue-400">Sign up</span>
</p>
</div>
);
}
// Flutter output
class LoginScreen extends StatefulWidget {
@override
_LoginScreenState createState() => _LoginScreenState();
}
class _LoginScreenState extends State<LoginScreen> {
final emailController = TextEditingController();
final passwordController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF0A0A0A),
body: Center(
child: Padding(
padding: EdgeInsets.all(24),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CircleAvatar(
radius: 60,
backgroundImage: AssetImage('assets/logo.png'),
),
SizedBox(height: 32),
TextField(
controller: emailController,
decoration: InputDecoration(
hintText: 'Email',
prefixIcon: Icon(Icons.mail),
),
),
SizedBox(height: 16),
TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
hintText: 'Password',
prefixIcon: Icon(Icons.lock),
),
),
SizedBox(height: 24),
ElevatedButton(
onPressed: () {},
child: Text('Log In'),
style: ElevatedButton.styleFrom(
minimumSize: Size(double.infinity, 48),
),
),
],
),
),
),
);
}
}
The designer automatically handles responsiveness:
%, rem and flex instead of fixed pixelsConnect components to data:
Save your designs as templates:
The designer is designed for touch interaction:
| Framework | Status | Code quality |
|---|---|---|
| React/JSX | β Stable | Excellent |
| Flutter | β Stable | Excellent |
| Android XML | β Stable | Very good |
| SwiftUI | π Beta | Good |
| Vue | π Planned | β |
The visual designer makes Pocket Code the only mobile IDE where you can design and program from the same device. Try it today and speed up your development!