@aaronshaf/panda-ui 中文文档教程

发布于 6年前 浏览 23 项目主页 更新于 3年前

Panda UI 是一套实验性的样式表和网络组件,类似于(并基于)InstUI

Theme stylesheets

<link
  rel="stylesheet"
  type="text/css"
  href="https://unpkg.com/@aaronshaf/panda-ui@1/dist/themes/canvas.css"
/>
<!-- or -->
<link
  rel="stylesheet"
  type="text/css"
  href="https://unpkg.com/@aaronshaf/panda-ui@1/dist/themes/canvas-high-contrast.css"
/>
.body {
  font-family: var(--typography-fontFamily);
}

Web components

Alert

<script
  src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/elements/alert.js"
  defer
></script>
<script
  src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/icons/checkmark.js"
  defer
></script>

import "@aaronshaf/panda-ui/dist/elements/alert.js";
import "@aaronshaf/panda-ui/dist/icons/checkmark.js";
<panda-alert variant="success">
  <div slot="icon">
    <panda-icon-checkmark></panda-icon-checkmark>
  </div>
  <div slot="content">
    Sample success alert text.
  </div>
</panda-alert>

Button

<script src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/elements/button.js"></script>

import "@aaronshaf/panda-ui/dist/elements/button.js";
<panda-button variant="primary">
  Primary button
</panda-button>

Progress Bar

<script
  src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/elements/progress-bar.js"
  defer
></script>

import "@aaronshaf/panda-ui/dist/elements/progress-bar.js";
<panda-progress-bar
  label="Loading completion"
  max="60"
  value="20"
  variant="primary"
>
  Primary button
</panda-progress-bar>

Dev

yarn
yarn run prepare
yarn run dev

Panda UI is an experimental set of stylesheets and web components in the likeness (and based on the work of) InstUI.

Theme stylesheets

<link
  rel="stylesheet"
  type="text/css"
  href="https://unpkg.com/@aaronshaf/panda-ui@1/dist/themes/canvas.css"
/>
<!-- or -->
<link
  rel="stylesheet"
  type="text/css"
  href="https://unpkg.com/@aaronshaf/panda-ui@1/dist/themes/canvas-high-contrast.css"
/>
.body {
  font-family: var(--typography-fontFamily);
}

Web components

Alert

<script
  src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/elements/alert.js"
  defer
></script>
<script
  src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/icons/checkmark.js"
  defer
></script>

or

import "@aaronshaf/panda-ui/dist/elements/alert.js";
import "@aaronshaf/panda-ui/dist/icons/checkmark.js";
<panda-alert variant="success">
  <div slot="icon">
    <panda-icon-checkmark></panda-icon-checkmark>
  </div>
  <div slot="content">
    Sample success alert text.
  </div>
</panda-alert>

Button

<script src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/elements/button.js"></script>

or

import "@aaronshaf/panda-ui/dist/elements/button.js";
<panda-button variant="primary">
  Primary button
</panda-button>

Progress Bar

<script
  src="https://unpkg.com/@aaronshaf/panda-ui@1/dist/elements/progress-bar.js"
  defer
></script>

or

import "@aaronshaf/panda-ui/dist/elements/progress-bar.js";
<panda-progress-bar
  label="Loading completion"
  max="60"
  value="20"
  variant="primary"
>
  Primary button
</panda-progress-bar>

Dev

yarn
yarn run prepare
yarn run dev
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文