6个精选Angular开源UI组件库,值得收藏
yuyutoo 2024-12-09 18:38 1 浏览 0 评论
2020年听过很多同行都说Vue、React、Angula前端三大框架,现在是Vue的天下了。我觉得如果这样理解就太片面了,毕竟每个框架都有自己的优缺点。今天就给大家分享几个在Angular开发中能快速提升开发效率的UI组件库。
1、Angular/Material
Angular官方出品的 Material Design 风格的UI组件库。
https://material.angular.io/
https://github.com/angular/components
安装
$ npm i @angular/material -S
使用
// 引入组件
import { NgModule } from '@angular/core';
import { MatButtonModule, MatCheckboxModule } from '@angular/material';
@NgModule({
...
imports: [MatButtonModule, MatCheckboxModule],
...
})
export class AppModule { }
// 模板中使用
<button mat-button>Basic</button>
<mat-checkbox class="example-margin" [(ngModel)]="checked">Checked</mat-checkbox>
2、NG-ZORRO
阿里巴巴团队推出的 Ant Design 风格Angular实现,主要用于企业级中后台产品。
Ant Design UI 的 Angular 实现,开发和服务于企业级中后台产品,开箱即用的高质量 Angular 组件。
https://ng.ant.design
https://github.com/NG-ZORRO/ng-zorro-antd
安装
$ npm i ng-zorro-antd -S
使用
// 引入组件
import { NgModule } from '@angular/core';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
NzButtonModule
]
})
export class AppModule { }
// 模板中使用
<button nz-button nzType="primary">Primary</button>
3、Element-Angular
饿了么团队出品的基于 Angular.js 桌面端组件库。
目前用户活跃度不高,因此,功能还不够完善,不够成熟。不过既然是饿了么团队开发的,可以尝试使用。
https://element-angular.faas.ele.me/
https://github.com/ElemeFE/element-angular
安装
$ npm i element-angular -S
使用
import { BrowserModule } from '@angular/platform-browser'
// import module
import { ElModule } from 'element-angular'
// if you use webpack, import style
import 'element-angular/theme/index.css'
@NgModule({
imports: [
BrowserModule,
ElModule.forRoot(),
...
],
...
bootstrap: [ExAppComponent],
})
// components
template: '<el-button>Hello World</el-button>'
4、PrimeNG
一套丰富的 UI 组件库,拥有80多种组件。
https://www.primefaces.org/primeng/
https://github.com/primefaces/primeng/
安装
$ npm i primeng primeicons -S
使用
// 引入组件
import { NgModule } from '@angular/core';
import { ButtonModule } from 'primeng/button';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
ButtonModule
]
})
export class AppModule { }
// 模板中使用
<button pButton type="button" label="Click" ></button>
<p-button label="Click" ></p-button>
5、Covalent
基于 Teradata 平台构建的 Material 风格的一套丰富 UI 组件库。
https://teradata.github.io/covalent/
https://github.com/teradata/covalent/
安装
$ npm i @covalent/core -S
## (optional) Additional Covalent Modules installs
$ npm i @covalent/http @covalent/highlight @covalent/markdown @covalent/dynamic-forms @covalent/echarts -S
使用
import { NgModule } from '@angular/core';
import { CovalentLayoutModule } from '@covalent/core/layout';
import { CovalentStepsModule } from '@covalent/core/steps';
/* any other core modules */
// (optional) Additional Covalent Modules imports
import { CovalentHttpModule } from '@covalent/http';
import { CovalentHighlightModule } from '@covalent/highlight';
import { CovalentMarkdownModule } from '@covalent/markdown';
import { CovalentDynamicFormsModule } from '@covalent/dynamic-forms';
import { CovalentBaseEchartsModule } from '@covalent/echarts/base';
// other imports
@NgModule({
imports: [
CovalentLayoutModule,
CovalentStepsModule,
// (optional) Additional Covalent Modules imports
CovalentHttpModule.forRoot(),
CovalentHighlightModule,
CovalentMarkdownModule,
CovalentDynamicFormsModule,
CovalentBaseEchartsModule,
],
...
})
export class AppModule { }
6、Ngx-Bootstrap
基于 Bootstrap 风格的 Angular 组件库。
https://valor-software.com/ngx-bootstrap
https://github.com/valor-software/ngx-bootstrap
安装
$ npm i ngx-bootstrap -S
使用
import { NgModule } from '@angular/core';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
@NgModule({
...
imports: [TooltipModule.forRoot(),...]
...
})
export class AppModule { }
// 模板中使用
<button type="button" class="btn btn-primary"
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
</button>
这次就分享到这里,如果小伙伴们有比较好的Angular组件库,可以在下方进行留言讨论,非常期待你的分享!
?? 最后
如果觉得这篇文章对你有帮助,点个「关注/转发」,让更多的人也能看到你的分享!
相关推荐
- 如何在HTML中使用JavaScript:从基础到高级的全面指南!
-
“这里是云端源想IT,帮你...
- 推荐9个Github上热门的CSS开源框架
-
大家好,我是Echa。...
- 硬核!知网首篇被引过万的论文讲了啥?作者什么来头?
-
整理|袁小华近日,知网首篇被引量破万的中文论文及其作者备受关注。知网中心网站数据显示,截至2021年7月23日,由华南师范大学教授温忠麟等人发表在《心理学报》2004年05期上的学术论文“中介效应检验...
- 为什么我推荐使用JSX开发Vue3_为什么用vue不用jquery
-
在很长的一段时间中,Vue官方都以简单上手作为其推广的重点。这确实给Vue带来了非常大的用户量,尤其是最追求需求开发效率,往往不那么在意工程代码质量的国内中小企业中,Vue占据的份额极速增长...
-
- 【干货】一文详解html和css,前端开发需要哪些技术?
-
网站开发简介...
-
2025-02-20 18:34 yuyutoo
- 分享几个css实用技巧_cssli
-
本篇将介绍几个css小技巧,目录如下:自定义引用标签的符号重置所有标签样式...
- 如何在浏览器中运行 .NET_怎么用浏览器运行代码
-
概述:...
- 前端-干货分享:更牛逼的CSS管理方法-层(CSS Layers)
-
使用CSS最困难的部分之一是处理CSS的权重值,它可以决定到底哪条规则会最终被应用,尤其是如果你想在Bootstrap这样的框架中覆盖其已有样式,更加显得麻烦。不过随着CSS层的引入,这一...
-
- HTML 基础标签库_html标签基本结构
-
HTML标题HTML标题(Heading)是通过-...
-
2025-02-20 18:34 yuyutoo
- 前端css面试20道常见考题_高级前端css面试题
-
1.请解释一下CSS3的flexbox(弹性盒布局模型),以及适用场景?display:flex;在父元素设置,子元素受弹性盒影响,默认排成一行,如果超出一行,按比例压缩flex:1;子元素设置...
- vue引入外部js文件并使用_vue3 引入外部js
-
要在Vue中引入外部的JavaScript文件,可以使用以下几种方法:1.使用``标签引入外部的JavaScript文件。在Vue的HTML模板中,可以直接使用``标签来引入外部的JavaScrip...
- 网页设计得懂css的规范_html+css网页设计
-
在初级的前端工作人员,刚入职的时候,可能在学习前端技术,写代码不是否那么的规范,而在工作中,命名的规范的尤为重要,它直接与你的代码质量挂钩。网上也受很多,但比较杂乱,在加上每年的命名都会发生一变化。...
- Google在Chrome中引入HTML 5.1标记
-
虽然负责制定Web标准的WorldWideWebConsortium(W3C)尚未宣布HTML5正式推荐规格,而Google已经迁移到了HTML5.1。即将发布的Chrome38将引入H...
- HTML DOM 引用( ) 对象_html中如何引用js
-
引用对象引用对象定义了一个同内联元素的HTML引用。标签定义短的引用。元素经常在引用的内容周围添加引号。HTML文档中的每一个标签,都会创建一个引用对象。...
你 发表评论:
欢迎- 一周热门
- 最近发表
- 标签列表
-
- mybatis plus (70)
- scheduledtask (71)
- css滚动条 (60)
- java学生成绩管理系统 (59)
- 结构体数组 (69)
- databasemetadata (64)
- javastatic (68)
- jsp实用教程 (53)
- fontawesome (57)
- widget开发 (57)
- vb net教程 (62)
- hibernate 教程 (63)
- case语句 (57)
- svn连接 (74)
- directoryindex (69)
- session timeout (58)
- textbox换行 (67)
- extension_dir (64)
- linearlayout (58)
- vba高级教程 (75)
- iframe用法 (58)
- sqlparameter (59)
- trim函数 (59)
- flex布局 (63)
- contextloaderlistener (56)