Convert Figma logo to code with AI

weilanwl logocoloruicss

鲜亮的高饱和色彩,专注视觉的小程序组件库

12,172
2,217
12,172
5

Top Related Projects

18,293

A lightweight and modular front-end framework for developing fast and powerful web interfaces

A utility-first CSS framework for rapid UI development.

49,259

Modern CSS framework based on Flexbox

Materialize, a CSS Framework based on Material Design

170,434

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

10,208

A minimalist CSS framework.

Quick Overview

ColorUI CSS is a lightweight, flexible CSS framework designed for rapid UI development. It offers a wide range of pre-designed components and utility classes, making it easy to create visually appealing and responsive interfaces without writing extensive custom CSS.

Pros

  • Lightweight and fast-loading, improving overall performance
  • Extensive collection of pre-designed components and utility classes
  • Easy to customize and extend
  • Suitable for both small and large-scale projects

Cons

  • Limited documentation, which may pose challenges for beginners
  • Less popular compared to other CSS frameworks, resulting in a smaller community and fewer resources
  • Some components may require additional JavaScript for full functionality

Code Examples

  1. Creating a button with ColorUI CSS:
<button class="cu-btn bg-blue shadow">Click me</button>
  1. Implementing a card component:
<div class="cu-card case">
  <div class="cu-item shadow">
    <div class="image">
      <img src="https://example.com/image.jpg" mode="widthFix">
    </div>
    <div class="cu-list menu-avatar">
      <div class="cu-item">
        <div class="content flex-sub">
          <div class="text-grey">Card Title</div>
          <div class="text-gray text-sm flex justify-between">
            Card description goes here
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
  1. Creating a responsive grid layout:
<div class="cu-row">
  <div class="cu-col-xs-12 cu-col-sm-6 cu-col-md-4">
    Column 1
  </div>
  <div class="cu-col-xs-12 cu-col-sm-6 cu-col-md-4">
    Column 2
  </div>
  <div class="cu-col-xs-12 cu-col-sm-12 cu-col-md-4">
    Column 3
  </div>
</div>

Getting Started

To start using ColorUI CSS in your project, follow these steps:

  1. Download the ColorUI CSS files from the GitHub repository.
  2. Include the CSS file in your HTML:
<link rel="stylesheet" href="path/to/colorui.css">
  1. Start using ColorUI classes in your HTML elements:
<div class="cu-bar bg-white">
  <div class="content">ColorUI Header</div>
</div>
<div class="cu-card">
  <div class="cu-item bg-cyan shadow">
    <div class="cardTitle">
      Card Title
    </div>
    <div class="content">
      Card content goes here
    </div>
  </div>
</div>

For more advanced usage and customization, refer to the documentation and examples provided in the GitHub repository.

Competitor Comparisons

18,293

A lightweight and modular front-end framework for developing fast and powerful web interfaces

Pros of UIkit

  • More comprehensive and feature-rich UI framework
  • Extensive documentation and community support
  • Responsive grid system and flexible layout options

Cons of UIkit

  • Larger file size and potentially slower load times
  • Steeper learning curve due to more complex components
  • Less focus on vibrant, colorful designs

Code Comparison

ColorUI CSS:

.bg-red {
  background-color: #e54d42;
  color: #ffffff;
}

UIkit:

<div class="uk-background-primary uk-light uk-padding">
  Primary background with light text
</div>

ColorUI CSS focuses on simple, predefined color classes, while UIkit offers more structured and semantic HTML with utility classes for styling.

UIkit provides a more robust framework with advanced features like JavaScript components and a flexible grid system. It's suitable for larger, more complex projects. ColorUI CSS, on the other hand, is lighter and easier to implement, making it ideal for smaller projects or quick prototyping with a focus on colorful, modern designs.

UIkit's extensive documentation and community support make it easier to troubleshoot and extend, but it may be overkill for simple projects. ColorUI CSS offers a more straightforward approach to styling, but may require more custom code for complex layouts or interactions.

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Highly customizable with a robust configuration system
  • Extensive documentation and large community support
  • Utility-first approach allows for rapid development and easy maintenance

Cons of Tailwind CSS

  • Steeper learning curve due to its utility-first nature
  • Can lead to longer class names and potentially cluttered HTML
  • Requires additional setup and build process for optimal use

Code Comparison

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Button
</button>

ColorUI:

<button class="cu-btn bg-blue lg">
  Button
</button>

Summary

Tailwind CSS offers more flexibility and customization options, making it suitable for larger projects with specific design requirements. It has a larger community and more comprehensive documentation. However, it can be more complex to set up and learn initially.

ColorUI provides a simpler, more straightforward approach with pre-designed components and a smaller footprint. It's easier to get started with but may offer less customization options compared to Tailwind CSS.

The choice between the two depends on project requirements, team expertise, and desired level of customization.

49,259

Modern CSS framework based on Flexbox

Pros of Bulma

  • More comprehensive and feature-rich CSS framework
  • Better documentation and community support
  • Modular architecture allowing for easy customization

Cons of Bulma

  • Larger file size, potentially impacting page load times
  • Steeper learning curve for beginners
  • Less focus on vibrant, colorful UI elements

Code Comparison

Bulma button example:

<button class="button is-primary">
  Button
</button>

ColorUI button example:

<button class="cu-btn bg-blue shadow-blur round">
  Button
</button>

Summary

Bulma is a more robust and widely-used CSS framework, offering a comprehensive set of components and utilities. It provides better documentation and community support, making it easier for developers to find solutions and resources. However, this comes at the cost of a larger file size and potentially slower load times.

ColorUI, on the other hand, focuses on providing a vibrant and colorful UI toolkit, which may be more suitable for projects requiring a modern and eye-catching design. It has a smaller footprint and may be easier for beginners to grasp quickly, but lacks the extensive documentation and community support that Bulma offers.

The choice between these two frameworks ultimately depends on the specific needs of your project, your design preferences, and your development experience.

Materialize, a CSS Framework based on Material Design

Pros of Materialize

  • More comprehensive framework with a wider range of UI components
  • Better documentation and community support
  • Follows Material Design principles, offering a cohesive and modern look

Cons of Materialize

  • Larger file size, potentially impacting page load times
  • Less customizable out-of-the-box compared to ColorUI
  • Steeper learning curve for beginners

Code Comparison

ColorUI CSS:

.bg-red {
  background-color: #e54d42;
  color: #ffffff;
}

Materialize:

.red {
  background-color: #F44336 !important;
}
.white-text {
  color: #FFFFFF !important;
}

ColorUI focuses on simplicity and ease of use, with predefined classes for quick styling. Materialize offers more granular control but requires combining multiple classes for similar effects.

Both frameworks aim to simplify UI development, but Materialize provides a more robust set of tools and follows established design guidelines. ColorUI, on the other hand, offers a lighter-weight solution with a focus on rapid prototyping and customization.

170,434

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Pros of Bootstrap

  • Extensive documentation and large community support
  • Comprehensive set of components and utilities
  • Highly customizable with Sass variables and mixins

Cons of Bootstrap

  • Larger file size, potentially impacting page load times
  • Steeper learning curve for advanced customization
  • More opinionated design, which may require overriding styles

Code Comparison

Bootstrap:

<div class="container">
  <div class="row">
    <div class="col-md-6">Column 1</div>
    <div class="col-md-6">Column 2</div>
  </div>
</div>

ColorUI:

<view class="cu-bar bg-white">
  <view class="action">
    <text class="cuIcon-title text-blue"></text>Title
  </view>
</view>

Bootstrap uses a grid system with classes like container, row, and col-*, while ColorUI employs custom classes like cu-bar and cuIcon-* for layout and icons.

Bootstrap offers a more comprehensive framework with extensive JavaScript components, while ColorUI focuses on providing a lightweight CSS solution with a vibrant color palette. ColorUI is specifically designed for mobile-first development, particularly for WeChat Mini Programs, whereas Bootstrap is a more general-purpose framework suitable for various web projects.

10,208

A minimalist CSS framework.

Pros of Milligram

  • Lightweight and minimalist design, with a smaller file size
  • Better documentation and examples provided in the repository
  • More active development and community support

Cons of Milligram

  • Less extensive UI component library compared to ColorUI
  • Limited color palette and customization options out of the box
  • Fewer pre-built layouts and templates

Code Comparison

Milligram:

.button,
button,
input[type='button'],
input[type='reset'],
input[type='submit'] {
  background-color: #9b4dca;
  border: 0.1rem solid #9b4dca;
  border-radius: .4rem;
  color: #fff;
  cursor: pointer;
}

ColorUI:

.cu-btn {
  position: relative;
  border: 0rpx;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 30rpx;
  font-size: 28rpx;
  height: 64rpx;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  overflow: visible;
  margin-left: initial;
  transform: translate(0rpx, 0rpx);
  margin-right: initial;
}

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

V3 测试版:https://github.com/weilanwl/coloruiBeta

ColorUI简介

素材

ColorUI在语雀有个群友共同在维护的知识库,里面有一些群友改的模板和UI素材供开发使用哦! 语雀-ColorUI群资源

前言

ColorUI是一个css库!!!在你引入样式后可以根据class来调用组件,一些含有交互的操作我也有简单写,可以为你开发提供一些思路。

交流

微信群:加入微信群请先添加开发者微信,备注UniApp插件市场。QQ群:240787041 或扫描二维码。

使用UniApp开发

开始

下载源码解压获得/Colorui-UniApp文件夹,复制目录下的 /colorui 文件夹到你的项目根目录

App.vue 引入关键Css main.css icon.css

<style>
@import "colorui/main.css";
@import "colorui/icon.css";
@import "app.css"; /* 你的项目css */
....
</style>

使用自定义导航栏

导航栏作为常用组件有做简单封装,当然你也可以直接复制代码结构自己修改,达到个性化目的。

App.vue 获得系统信息

onLaunch: function() {
  uni.getSystemInfo({
    success: function(e) {
      // #ifndef MP
      Vue.prototype.StatusBar = e.statusBarHeight;
      if (e.platform == 'android') {
        Vue.prototype.CustomBar = e.statusBarHeight + 50;
      } else {
        Vue.prototype.CustomBar = e.statusBarHeight + 45;
      };
      // #endif
      // #ifdef MP-WEIXIN
      Vue.prototype.StatusBar = e.statusBarHeight;
      let custom = wx.getMenuButtonBoundingClientRect();
      Vue.prototype.Custom = custom;
      Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
      // #endif		
      // #ifdef MP-ALIPAY
      Vue.prototype.StatusBar = e.statusBarHeight;
      Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
      // #endif
    }
  })
},

pages.json 配置取消系统导航栏

"globalStyle": {
  "navigationStyle": "custom"
},

复制代码结构可以直接使用,注意全局变量的获取。

使用封装,在main.js 引入 cu-custom 组件。

import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)

page.vue 页面可以直接调用了

<cu-custom bgColor="bg-gradual-blue" :isBack="true">
  <block slot="backText">返回</block>
  <block slot="content">导航栏</block>
</cu-custom>
参数作用类型默认值
bgColor背景颜色类名String''
isBack是否开启返回Booleanfalse
bgImage背景图片路径String''
slot块作用
backText返回时的文字
content中间区域
right右侧区域(小程序端可使用范围很窄!)

使用原生小程序开发

从现有项目开始

下载源码解压获得/demo,复制目录下的 /colorui 文件夹到你的项目根目录

App.wxss 引入关键Css main.wxss icon.wxss

@import "colorui/main.wxss";
@import "colorui/icon.wxss";
@import "app.css"; /* 你的项目css */
....

从新项目开始

下载源码解压获得/template,复制/template并重命名为你的项目,导入到小程序开发工具既可以开始你的新项目了

使用自定义导航栏

导航栏作为常用组件有做简单封装,当然你也可以直接复制代码结构自己修改,达到个性化目的。

App.js 获得系统信息

onLaunch: function() {
  wx.getSystemInfo({
    success: e => {
      this.globalData.StatusBar = e.statusBarHeight;
      let custom = wx.getMenuButtonBoundingClientRect();
      this.globalData.Custom = custom;  
      this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
    }
  })
},

App.json 配置取消系统导航栏,并全局引入组件

"window": {
  "navigationStyle": "custom"
},
"usingComponents": {
  "cu-custom":"/colorui/components/cu-custom"
}

page.wxml 页面可以直接调用了

<cu-custom bgColor="bg-gradual-pink" isBack="{{true}}">
  <view slot="backText">返回</view>
  <view slot="content">导航栏</view>
</cu-custom>

参数作用类型默认值
bgColor背景颜色类名String''
isBack是否开启返回Booleanfalse
isCustom是否开启左侧胶囊Booleanfalse
bgImage背景图片路径String''
slot块作用
backText返回时的文字
content中间区域
right右侧区域(小程序端可使用范围很窄!)

赞赏

License

MIT

Copyright (c) 2020-present, XiaoGang Wen