blueprintui
v2.1.7
| 包裹 | 下载 | CI状态 | CDN |
|---|---|---|---|
蓝图UI组件是作为Web组件构建的。这使他们能够在各种框架和库中工作。蓝图UI分为几个可以独立使用的软件包。要使用组件安装以下内容,
npm install @blueprintui/components还提供了用于布局和版式实用程序的可选软件包。
npm install @blueprintui/layout @blueprintui/typography要使用组件,必须将基本主题CSS文件加载到页面中。这可以通过CSS导入或HTML链接完成。
@import '@blueprintui/themes/index.min.css' ;
@import '@blueprintui/themes/dark/index.min.css' ;或者
< link rel =" stylesheet " href =" @blueprintui/themes/index.min.css " >
< link rel =" stylesheet " href =" @blueprintui/themes/dark/index.min.css " > 蓝图UI组件可以通过CDN用于快速,易于原型制作。
< link rel =" stylesheet " href =" https://unpkg.com/@blueprintui/themes/index.min.css " >
< link rel =" stylesheet " href =" https://unpkg.com/@@blueprintui/themes/dark/index.min.css " >
< script type =" module " >
import 'https://cdn.jsdelivr.net/npm/@blueprintui/components/include/alert.js/+esm' ;
</ script > 一旦加载了主题CSS,就可以通过JavaScript导入导入组件。
import '@blueprintui/components/include/alert.js' ; < body bp-theme =" { theme: 'dark' }); " >
< bp-alert status =" success " > hello there! </ bp-alert >
</ body >