Skip to content

Templates

This page provides commonly used project templates and page templates for uni-app development to help developers quickly build applications.

Table of Contents

Official Project Templates

Basic Templates

Official uni-app basic project templates, suitable for projects starting from scratch.

Template NameDescriptionDownload Link
Default TemplateBasic uni-app project with essential page structureDownload
Hello uni-appDemonstrates uni-app framework components, APIs, templates, etc.Download
uni-ui Project TemplateProject template integrated with uni-uiDownload

Industry Templates

Project templates for specific industries, including common industry features and pages.

Template NameDescriptionDownload Link
E-commerce TemplateIncludes core e-commerce features like product list, details, cart, ordersDownload
News TemplateIncludes news features like article list, details, commentsDownload
Chat Social TemplateIncludes instant messaging, friend list, chat interface and other social featuresDownload
Video TemplateIncludes video playback, list, comments and other video app featuresDownload
Q&A Community TemplateIncludes question posting, answering, voting and other community interaction featuresDownload

Page Templates

Login & Registration Templates

Various styles of login and registration page templates.

Template NameDescriptionPreviewDownload Link
Simple Login TemplateClean style login/registration pagesSimple Login TemplateDownload
Background Image Login TemplateLogin/registration pages with background imagesBackground Image Login TemplateDownload
SMS Verification Login TemplatePages supporting SMS verification code loginSMS Verification Login TemplateDownload
Social Login TemplatePages supporting third-party login like WeChat, QQSocial Login TemplateDownload

List Templates

Various styles of list page templates.

Template NameDescriptionPreviewDownload Link
Card ListCard-style layout list pagesCard ListDownload
Media ListImage-text mixed layout list pagesMedia ListDownload
Product ListProduct list pages suitable for e-commerce appsProduct ListDownload
Waterfall ListWaterfall layout list pagesWaterfall ListDownload

Detail Page Templates

Various styles of detail page templates.

Template NameDescriptionPreviewDownload Link
Article DetailArticle detail pages suitable for blogs, newsArticle DetailDownload
Product DetailProduct detail pages suitable for e-commerce appsProduct DetailDownload
Video DetailVideo detail pages suitable for video appsVideo DetailDownload
User ProfileUser profile pagesUser ProfileDownload

Form Templates

Various form page templates.

Template NameDescriptionPreviewDownload Link
Basic FormPages with common form elementsBasic FormDownload
Step FormMulti-step form pagesStep FormDownload
Advanced FormForm pages with complex validation and interactionAdvanced FormDownload
Search PageVarious search page templatesSearch PageDownload

Component Templates

Various navigation component templates.

Template NameDescriptionPreviewDownload Link
Header NavigationCustom header navigation bar templatesHeader NavigationDownload
Bottom Tab BarCustom bottom tab bar templatesBottom Tab BarDownload
Sidebar NavigationSidebar navigation templatesSidebar NavigationDownload
Segment NavigationSegment navigation templatesSegment NavigationDownload

Functional Component Templates

Various functional component templates.

Template NameDescriptionPreviewDownload Link
Image UploadImage selection and upload componentsImage UploadDownload
Comment ComponentComment list and posting componentsComment ComponentDownload
Calendar ComponentDate selection and calendar display componentsCalendar ComponentDownload
Shopping Cart ComponentShopping cart functionality componentsShopping Cart ComponentDownload

How to Use Templates

Method 1: Use Templates When Creating Projects in HBuilderX

  1. Open HBuilderX, click "File" > "New" > "Project"
  2. Select the desired template from the project template list
  3. Fill in the project name and storage path
  4. Click the "Create" button to complete project creation

Method 2: Import Downloaded Templates

  1. Download the template archive and extract it
  2. Open HBuilderX, click "File" > "Import" > "Import from Local Directory"
  3. Select the extracted template folder
  4. Click the "Import" button to complete the import

Method 3: Copy Template Code to Existing Projects

  1. Download and extract the template
  2. Open the template folder and find the required page or component code
  3. Copy the code to the corresponding location in your project
  4. Modify and adjust the code as needed

Template Development and Contribution

If you have excellent templates to share with the community, you can contribute through the following ways:

  1. Upload your templates on DCloud Plugin Market
  2. Submit PR to uni-app GitHub repository
  3. Share your templates in uni-app Community

FAQ

What to do if templates don't run properly?

  1. Check if plugins and components required by the template are installed
  2. Confirm if HBuilderX and uni-app versions match template requirements
  3. Review notes in template documentation
  4. Search or ask questions in the community

How to modify template styles?

  1. Find style files in the template (usually .css, .scss, or .less files)
  2. Modify style code as needed
  3. If theme variables are used, you can adjust styles uniformly by modifying theme variables

How to extend template functionality?

  1. Analyze template code structure to understand implementation principles
  2. Add new features without breaking existing functionality
  3. Follow template code style and naming conventions
  4. Test to ensure new features don't affect existing functionality

一次开发,多端部署 - 让跨平台开发更简单