DEV Community

Cover image for ๐Ÿš€ How to Use FlyonUI Block with AI Tools?
Pruthvi prajapati for ThemeSelection

Posted on

๐Ÿš€ How to Use FlyonUI Block with AI Tools?

Welcome to this in-depth tutorial on how to build a modern, AI-assisted landing page for a BBQ restaurant using FlyonUI, Copy Prompt, and Context7 MCP โ€” all inside a Next.js project.

โšก Whether you're a developer looking to speed up UI creation or someone curious about integrating AI tools into your dev workflow, this guide will walk you through every step.


Table of Contents


๐Ÿง‘โ€๐Ÿ’ป Introduction

Hey everyone! In this blog, weโ€™ll walk you through how we built a fully responsive landing page for a BBQ restaurant using FlyonUI Blocks and some powerful AI tools.

We'll be using:

  • FlyonUI Blocks
  • The Copy Prompt feature
  • And the Context7 MCP server

All inside a Next.js setup โ€” itโ€™s super fast, clean, and easy to extend.


๐Ÿงพ What Are FlyonUI Blocks?

FlyonUI Blocks are a curated collection of 500+ ready-to-use layout sections built with Tailwind CSS, covering everything from marketing headers to dashboards, ecommerce pages, data tables, and more. Each block is customizable, responsive, accessible, and supports themes and RTL layouts.

FlyonUI is an open-source Tailwind Component library offering:

  • 80+ standalone components, like buttons, cards, modals, alerts, switchers, accordions, and advanced selects
  • Blocks built on top of componentsโ€”500+ free and premium layout sections to compose pages quickly

๐Ÿ” Block Categories at a Glance

FlyonUI Blocks fall into five main categories:

Category Description
Marketing UI Hero sections, CTAs, feature highlights, testimonials
Dashboard & App UI Layouts, widgets, modals, sidebars, charts, forms
eCommerce UI Product cards, filters, reviews, cart, checkout flows
Data Table UI Interactive tables, stats, filters, pagination
Bento Grid UI Responsive grids and layout systems

Each section includes both free and pro options and is theme-ready with RTL support.


๐ŸŽจ Why Use FlyonUI Blocks?

โšก Jetโ€‘Fast UI Composition

You can assemble entire pages by mixing and matching the Tailwind blocksโ€”no repetitive boilerplate, just copy-paste or import.

๐Ÿงฉ Clean, Maintainable Code

Blocks use semantic class names built on Tailwind utilities for readable, modifiable markup that avoids class clutter.

๐ŸŒˆ Unlimited Theming

Support for multiple design themes (Light, Dark, Luxury, Corporate, etc.) without rewriting classes, plus full dark mode and RTL compatibility.

๐Ÿ’ก Fully Customizable Interactivity

Includes headless JS plugins for accessible interactive components (dropdowns, accordions, overlays)โ€”no additional frameworks needed.

๐Ÿ›  Crossโ€‘Framework Support

Works seamlessly in plain HTML or within React, Vue, Svelte, and other Tailwind-compatible environments.


โš™๏ธ Starting with Different Frameworks and Technologies

FlyonUI provides framework integration guides for multiple frameworks. Most contain manual setup instructions and starter kits. Weโ€™ll be using the Next.js starter kit for this tutorial.

NextJs starterkit github

โœ… Steps:

  1. Clone the FlyonUI Next.js starter project
  2. Install dependencies:

    npm install 
  3. Run the development server:

    npm run dev 

๐Ÿ’ก New to FlyonUI? Watch the Getting Started with FlyonUI | Beginnerโ€™s Guide โšก๏ธ.


How to Use FlyonUI Blocks

There are multiple ways to use FlyonUI Blocks:

1. Copy-Paste FlyonUI Blocks

You can use the Copy button in the code section to grab the HTML. However, if the block contains CSS or JS, you must copy and integrate those separately into your project.

Copy-Paste


2. Using Copy Prompt

This feature lets you copy a complete code block (HTML, CSS, JS) using a structured prompt โ€” ideal for feeding into AI tools.

Copy Prompt

Copy Prompt


๐Ÿง  Letโ€™s build the BBQ Restaurant Landing Page with the Copy Prompt Feature

The Copy Prompt feature is a game-changer. It helps you instantly copy a structured prompt to feed into your favorite AI tool.


๐Ÿ›  How It Works

Visit ๐Ÿ‘‰ FlyonUIโ€™s Tailwind CSS Blocks.

Use the pre-built prompts to generate your website sections using AI tools like VS Code, Cursor, or Windsurf.


1. ๐Ÿ”ฅ Hero Section

  1. Go to the Hero section.

Hero

  1. Select the block you want, then click the "Copy Prompt" button.
  2. Paste it into your AI tool.
  3. Add further custom instructions:

    Create a hero section related to my BBQ restaurant, so update the context accordingly. - Don't use image imports; use an HTML <img> tag instead. 

2. ๐Ÿ‘จโ€๐Ÿณ About Us Section

  1. Navigate to the About Us section.

About Us

  1. Select the block you want, then click the "Copy Prompt" button.
  2. Paste it into your AI tool.
  3. Add further custom instructions:

    Create an About Us section using the above code, add it after the hero section, and update the image using Unsplash and context 

3. ๐Ÿ– Menu Section

  1. Navigate to the Gallery, we will use this as the Menu section so we can display images.

Menu

  1. Select the block you want, then click the "Copy Prompt" button.
  2. Paste it into your AI tool.
  3. Add further custom instructions:

    Create me the menu section with the help of the above Gallery code, keep the file name menu section, update the image from Unsplash, and also update the context accordingly 
  4. Now, sometimes the image from Unsplash might be broken as they might be pro images, so we will update those with the help of AI

    Image-xzy is broken, change it to a working link, use a free Unsplash image 

4. ๐Ÿ›Ž๏ธ Services Section

  1. Go to the Blog, we will use it for Service section.

Services

  1. Select the block you want, then click the "Copy Prompt" button.
  2. Paste it into your AI tool.
  3. Add further custom instructions:

    Create a Services section for my BBQ restaurant (e.g., dine-in, catering, delivery). Place it after the menu section. 

5. ๐ŸŒŸ Testimonials

  1. Visit the Testimonials section.

Testimonials

  1. Select the block you want, then click the "Copy Prompt" button.
  2. Paste it into your AI tool.
  3. Add further custom instructions:

    Create a Testimonials section withthe provided code and add it after the service section 

6. ๐Ÿ“ž Contact Us

  1. Navigate to the Contact Us section.

Contact Us<br>

  1. Select the block you want, then click the "Copy Prompt" button.
  2. Paste it into your AI tool.
  3. Add further custom instructions:

    Create a booking section with the help of the above code and add it after the testimonials section 

7. ๐Ÿ”š Footer

  1. Go to the Footer section.

Footer

  1. Select the block you want, then click the "Copy Prompt" button.
  2. Paste it into your AI tool.
  3. Add further custom instructions:

    Create me Footer section with the help above code and add it after the testimonials section 

How to Customise FlyonUI Blocks

There are two methods:

๐Ÿงฉย 1. Direct Code Changes

Once a section is created, you might want to adjust things like icon sizes, spacing, padding, or margins to better match your design.

These changes can be done manually in the code.

๐Ÿ“Œ Example: Adjusting Icon (Avatar) Size

Letโ€™s say you want to increase the size of an avatar icon. Hereโ€™s the original code:

<div class="avatar"> <div class="size-10 rounded-full"> <img src="<https://cdn.flyonui.com/fy-assets/avatar/avatar-1.png>" alt="avatar" /> </div> </div> 
Enter fullscreen mode Exit fullscreen mode

To make the avatar larger, simply change size-10 to size-12:

<div class="avatar"> <div class="size-12 rounded-full"> <img src="<https://cdn.flyonui.com/fy-assets/avatar/avatar-1.png>" alt="avatar" /> </div> </div> 
Enter fullscreen mode Exit fullscreen mode

โœ… This small change increases the avatar size while keeping everything else intact.


๐Ÿงฉ 2. Customizing Components with Context7 MCP

Once the landing page is complete, weโ€™ll fine-tune the components โ€” styles, layout, and design.

๐Ÿ” What is Context7 MCP?

Context7 MCP is a Model Context Provider that plugs into your AI tool (like Cursor or VS Code) to feed real-time, version-specific documentation from FlyonUI.

It helps you:

  • Get accurate suggestions
  • Modify components easily
  • Stay updated with the latest UI patterns.

๐Ÿ”ย Setup Context7 MCP

Follow the setup instructions for your preferred code editor in the official FlyonUI Context7 MCP docs.

FlyonUI provides seamless integration for VS Code, Cursor, Windsurf, and Cline, allowing you to use AI-powered suggestions directly within your editor.


๐Ÿงฐ Example Use Case

Weโ€™ll update the theme and font family for our restaurant landing page

Use context7. Using FlyonUI, update the theme to "gourmet". I don't want light or dark, only gourmet. Update the font accordingly. 
Enter fullscreen mode Exit fullscreen mode

Other things you can do with Context7:

  • Change themes
  • Modify component styles.
  • Add component with just the prompt
example: Use context7, using FlyonUI, add Faq accordion after testimonials. Use the accordion shadow example. 
Enter fullscreen mode Exit fullscreen mode
  • Update colors, icons, spacing, fonts, and more

โœ… Conclusion

And thatโ€™s a wrap! ๐ŸŽ‰

Youโ€™ve now seen how to:

  • Set up FlyonUI with Next.js
  • Use the Copy Prompt to generate full UI blocks
  • Build a clean landing page quickly
  • Use Context7 MCP to customize and improve components using AI

This combination of tools drastically reduces manual coding while still giving you full control over design and structure.


๐Ÿ“บ Watch the Full Video

Catch the full walkthrough in the video below.


Unlock The Full Potential of Tailwind AI with FlyonUI MCP ๐Ÿคฉ

FlyonUI MCP - Tailwind AI Builder

FlyonUI MCP is Tailwind AI Builder, a smart tool designed to help developers create Tailwind CSS components, blocks, and landing pages more efficiently.

Besides, it integrates directly into your IDE, allowing you to generate UI elements with simple prompts, inspired by the FlyonUI library.

Key Features:

The following are some of the awesome features that make FlyonUI MCP an awesome Tailwind AI Builder:

  • Tailwind AI Builder: Generate intelligent layouts and components using AI.
  • Framework Compatibility: Svelte, Nextjs, HTML, React, Nuxt, Vue
  • Live Preview: See your UI evolve in real-time as you design.
  • Blazing Fast Workflow: โ€“ Build and ship interfaces in minutes, not hours.
  • Low-Code Workflow: Create components, blocks, or landing pages with just a few prompts.
  • IDE Integration: Visual Studio Code, Cursor, Windsurf, VS Code + Cline.
  • Prompt-Based Creation: Instantly create customized Tailwind blocks, pages & more.

Top comments (0)