⌘ K
Components
Pinx utilizes and integrates the comprehensive set of components provided by naive-ui. This component library offers a diverse range of UI elements that cater to a wide spectrum of use cases and application scenarios. By leveraging this robust component set, Pinx can effectively address various interface requirements and user interaction needs. The selection of components available in naive-ui is designed to encompass the majority of use cases, ensuring flexibility, consistency, and efficiency in developing user interfaces within the Pinx template.
Here is the full list of components:: https://www.naiveui.com/en-US/os-theme/components
- Avatar
- Button
- Card
- Carousel
- Collapse
- Divider
- Dropdown
- Ellipsis
- Gradient Text
- Icon
- PageHeader
- Tag
- Typography
- Watermark
- Auto Complete
- Cascader
- Color Picker
- Checkbox
- Date Picker
- Dynamic Input
- Dynamic Tags
- Form
- Input
- Input Number
- Mention
- Radio
- Rate
- Select
- Slider
- Switch
- Time Picker
- Transfer
- Tree Select
- Upload
- Calendar
- Countdown
- Code
- Data Table
- Descriptions
- Empty
- Equation
- Image
- List
- Log
- Number Animation
- Statistic
- Table
- Thing
- Time
- Timeline
- Tree
- Alert
- Badge
- Dialog
- Drawer
- Message
- Modal
- Notification
- Popconfirm
- Popover
- Popselect
- Progress
- Result
- Skeleton
- Spin
- Tooltip
- Affix
- Anchor
- Back Top
- Breadcrumb
- Loading Bar
- Menu
- Pagination
- Steps
- Tabs
- Layout
- Legacy Grid
- Grid
- Space
It is possible to import the components in three different ways:
Import on Demand (Tree Shaking)
<template>
<n-button>naive-ui</n-button>
</template>
<script setup>
import { NButton } from "naive-ui"
</script>
Install Globally (Not Recommended)
import { createApp } from "vue"
import naive from "naive-ui"
const app = createApp(App)
app.use(naive)
Auto Import (unplugin-vue-components)
// vite.config.ts
import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import AutoImport from "unplugin-auto-import/vite"
import Components from "unplugin-vue-components/vite"
import { NaiveUiResolver } from "unplugin-vue-components/resolvers"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
AutoImport({
imports: [
"vue",
{
"naive-ui": ["useDialog", "useMessage", "useNotification", "useLoadingBar"]
}
]
}),
Components({
resolvers: [NaiveUiResolver()]
})
]
})
Here is the full documentation.: https://www.naiveui.com/en-US/os-theme/docs/import-on-demand
To the Naive-ui components, some exclusive components from Pinx have been added, which you can find in these directories:
components/common
: Components commonly used throughout the entire application.app-layouts/common
: Support components for the layout.