Loading...

Loading...

How To Create UI Design With AI
Loading like and share buttons...
#pencil#claudecode#ui#frontend

How To Create UI Design With AI

Tomer Raitz
Tomer Raitz
Apr 73 min read

If you've ever dreamed of a way to create a UI designer that builds your app screens before you even start developing, this is the blog post for you. In this post, you will see how to implement a designer using Claude Code and Pencil.

Why do we need it?

Great question! We could just tell Claude what our app is about and then have it modify the UI as we tweak the code. However, there are several reasons why that isn't a good idea:

  • Time: The most obvious reason is wasted time. The UI design process can be lengthy. If you have to refactor the code after every single screen creation, it takes much longer than just designing the UI first and developing it afterward.
  • Separation of Concerns: As we've mentioned on the blog many times, we need to keep the context window as small as possible. It's important to split processes into smaller tasks. This is why handling UI design in a separate context before developing it is a great approach.
  • Expert Domains: It's considered a best practice to create agents with specific expertise to handle single types of tasks. For example, a designer agent handles the UI design, while a frontend developer agent deals with component creation.

So, how do we do this magic?

Step 1: Installation

  1. Go to https://www.pencil.dev/downloads
  2. Download the Pencil Desktop app or Extension.

In Claude Code, the MCP installation happens automatically. However, if it doesn't work for you, add this to your MCP configuration:

📦JSON
1
2
3
4
5
6
7
8
9
    "pencil": {
      "command": "/path/to-your-pencil-desktop/mcp-server-windows-x64.exe",
      "transport": "stdio",
      "args": [
        "--app",
        "desktop"
      ],
      "env": {}
      }
  1. Open pencil App
  2. Create a new .pen file and save it in your project folder.

Step 2: Install the Frontend-Design Claude Code Plugin

  1. Open Claude Code.
  2. Run the /plugin command.
  3. Search for frontend-design and install it.

Step 3: Create Your New Design

  1. Before your main prompt, write something like: "I want to use frontend-design."
  2. Ask it to generate your design. For example: "Create an app design for a todo app."
  3. Review the output and fix it if needed.

Comments

0 comments

Enter your comment. Maximum 2000 characters.

No comments yet. Be the first to share your thoughts!
Vibki logo wave icon
Vibki Surfing Bot
Vibki

Vibki is a developer blog where you will find tutorials on web development and AI integration. Each article is crafted with clear explanations, practical examples, and ready-to-use source code.

Talk to me
Copy email
LinkedIn
GitHub
Dev.to