Skip to content
Tutorial

Visual Designer: Creating UIs Without Writing Code

Learn how to use PocketCode's drag & drop visual designer to build interfaces and export HTML/CSS, or React, Vue and Svelte with Pro.

Updated:
8 min
By Pelayo Naredo

Visual Designer: Build Interfaces by Dragging and Dropping

The Visual Designer is one of the most powerful features in PocketCode. It lets you create user interfaces visually and generates HTML and CSS you can open and edit, with React, Vue and Svelte export on Pro.

Why a visual designer?

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.

Advantages

  • Speed: Design in minutes, not hours
  • Visual: See the result in real-time
  • Real code: Exports HTML and CSS you can read and edit
  • Multi-target: HTML/CSS and SVG, plus React, Vue and Svelte with Pro

Getting started

Open the designer

  1. Open the Tools sheet from the bottom bar (or the side rail on a tablet) and tap Designer. You can also use the command palette or the Home quick action
  2. Tap Manual Design for a blank canvas (name, size, and Page flow or Free canvas) or open My Designs and use From Template
  3. Export whenever you like: HTML, CSS, SVG, ZIP or .pcd for free, React, Vue or Svelte with Pro

From My Designs you can also import a .pcd file, a Figma JSON file or HTML (a subset of tags: div, section, headings, p, a, button, img, input). An .html file can't be opened in the Designer straight from the editor: import it from My Designs.

Basic interface

The designer is divided into:

  • Side panel — Components, properties, layers, theme and tools, in five tabs
  • Canvas — Your design area, with the artboard and the guides

On a tablet the side panel is docked beside the canvas, so it never covers what you are working on. On a phone a bottom bar (Pages, Components, Style, Layers, Tools) opens them as sheets when you need them, and Theme lives under Tools.

The designer on a tablet: canvas on the left with a landing page, docked side panel on the right with the component palette open

Available components

The palette covers 49 component types in eight sections: Basics, Text, Forms, Containers, Navigation, Media, Feedback and Data. A selection:

Containers

ComponentDescription
RowHorizontal elements
ColumnVertical elements
BoxGeneric container
GridCSS Grid layout
Scroll ViewScrollable area
CardInformation card
ListList of items

Forms

ComponentDescription
Text FieldText field
Text AreaMulti-line text
SwitchOn/Off switch
SliderValue selector
DropdownDropdown menu
CheckboxCheckbox
RadioRadio option

Basics, text and media

ComponentDescription
ButtonButton with variants
LinkText link
TextText with styles
HeadingHeading with a level
ImageImages
DividerVisual separator
IconBuilt-in icons
ComponentDescription
NavbarTop navigation bar
Tab BarTab navigation
Bottom NavBottom navigation
BreadcrumbHierarchical navigation

Practical tutorial: Login screen

Let's create a complete login screen step by step:

Step 1: Basic structure

Drag a Column to the canvas and configure:

  • Alignment: center
  • Padding: 24px
  • Background: #0a0a0a

Inside the column, drag an Image:

  • Size: 120x120
  • Border-radius: full (circle)
  • Margin-bottom: 32px

Step 3: Text fields

Add two Text Field components:

Email:

  • Placeholder: "Email"
  • Type: email
  • Width: Fill

Password:

  • Placeholder: "Password"
  • Type: password
  • Width: Fill

Step 4: Login button

Drag a Button:

  • Text: "Log In"
  • Style: primary
  • Full width: on
  • Border-radius: 12px

Add Text and Link components for:

  • "Forgot your password?" (link style)
  • "Don't have an account? Sign up" (dimmed text + link)

Generated code

The designer exports the layout as markup plus the CSS it needs. The snippets below show the shape of the output for React and Vue, not the exact text:

JSX
// React output (shape only): one file with its CSS embedded
import React from "react";

const styles = `
  /* generated CSS for your components */
`;

export default function LoginScreen() {
	return (
		<div className="design-container">
			<style>{styles}</style>
			{/* your components, as plain elements with generated class names */}
		</div>
	);
}
Vue
<!-- Vue output (shape only) -->
<template>
  <div class="design-container">
    <!-- your components -->
  </div>
</template>

<script>
export default { name: "LoginScreen" };
</script>

<style scoped>
/* generated CSS for your components */
</style>

The framework exports are markup and styles: state, event handlers and routing are added later in code.

Advanced features

Responsive design

The same page previewed at 320 px, with the breakpoint list on the right and the active width ticked

The designer has two layout modes. Page flow (the default for a new manual design) stacks blocks in order and exports real, responsive HTML; Free canvas positions every element where you drop it, and templates and imported designs start there. Before exporting, the designer offers to convert a free-canvas design to flow.

  • Preview widths: Original plus six widths (Mobile S 320, Mobile 375, Mobile L 428, Tablet 768, Desktop 1280, Desktop L 1440). Mobile S, Mobile L and Desktop L are Pro
  • Breakpoints: Tablet (up to 900 px) and Mobile (up to 480 px) by default, and you can edit them or add your own for free. Per breakpoint you can change position, size, visibility and styles, and they export as real @media rules
  • Sizing: Fixed, Hug or Fill, with minimum and maximum values

States and interactions

Each component has five states: Normal, Hover, Active, Focus and Disabled. You can style them independently and they export as :hover, :active, :focus and :disabled. The Interactions tab adds simple behavior:

  1. Select a component (e.g., a Button)
  2. Pick a trigger: Tap, Hover, Scroll into view, Page load, After a delay or Form submit
  3. Pick an action: Navigate to page, Open overlay, Close overlay, Toggle visibility, Scroll to, Set state or Open URL

In the HTML export these become a small script for page navigation, dialogs and form validation. The React, Vue and Svelte exports are markup and styles, so behavior there (click handlers, routing, data) is added in code.

Reusable parts

  • Components: Convert a selection to a component and reuse it from My components. Instances are copies: after editing the original, tap Update all instances
  • Design system: Define tokens (colors, spacing, typography and more), text styles and a light and dark theme
  • Templates and blocks: Start from one of the 5 built-in templates (Landing Page, Login Form, Dashboard, Portfolio, E-Commerce) or add one of the 5 ready-made blocks. The Free plan can create up to 3 designs from templates

Gesture support

The designer is designed for touch interaction:

  • Pinch to zoom on the canvas (two fingers also pan)
  • Tap to select the innermost element and tap again to go up a level; double-tap a container to isolate it, or a text to edit it
  • Long-press a selected element for its contextual menu, or an unselected one to start a multi-selection
  • Swipe between the panels on a phone

Export targets

The designer generates real, editable code — all web-based. There are eight export formats:

TargetOutput
HTMLClean, framework-free markup
CSSThe stylesheet on its own
SVGVector export of the canvas
ZIPThe whole design with its assets
.pcdPocketCode's own design file
React / JSXOne component file with its CSS embedded (Pro)
VueSingle-file components (Pro)
Svelte.svelte components (Pro)

You can also copy a single component as an HTML snippet, and PocketCode Project (Pro) saves the design as a code project, which counts toward your project limit. Web fonts are linked from Google Fonts, so the exported HTML needs a connection to show them.

Tips and best practices

  1. Start with the structure: Place containers before content
  2. Use Page flow: It exports responsive HTML; avoid fixed sizes whenever possible
  3. Name your components: Generates more readable code
  4. Preview often: Check on different screen sizes
  5. Export incrementally: Don't wait until the end to check the code

The visual designer lets you design and program from the same device — sketch a screen, export HTML/CSS (or React, Vue and Svelte with Pro), and keep building right there. Try it today and speed up your development!

The tool behind this article

Designer

Ready to try PocketCode?

Download the app and start coding from your mobile.