Skip to content

快速开始

这个教程可以帮助你快速上手 Galaxy UI。

安装

选择合适的包管理工具,然后执行:

sh
$ pnpm add galaxy-ui
sh
$ yarn add galaxy-ui
sh
$ npm add galaxy-ui

引入样式文件

Sass 的最低支持版本为 1.79.0,推荐使用 sass-embedded

scss
@use 'galaxy-ui/index.scss';
scss
@forward 'galaxy-ui/theme.scss' with (
  $namespace: 'g'
);

使用

vue
<script setup lang="ts">
import { GButton } from 'galaxy-ui'
</script>

<template>
  <g-button>按钮</g-button>
</template>
ts
import GalaxyUI from 'galaxy-ui'
import { createApp } from 'vue'

const app = createApp(App)

app.use(GalaxyUI)