### Quick Start Vue.js 3 Application Setup Source: https://github.com/chrischan13/zenless-ui/blob/main/README.EN.md This JavaScript code demonstrates how to integrate Zenless UI into a Vue.js 3 application. It imports necessary modules, the UI library, its CSS, and the main App component, then mounts the application. ```javascript import { createApp } from 'vue' import ZenlessUI from 'zenless-ui' import 'zenless-ui/dist/index.css' import App from './App.vue' const app = createApp(App) app.use(ZenlessUI) app.mount('#app') ``` -------------------------------- ### Vue Pagination Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Shows how to use the z-pagination component for managing page navigation. Examples include basic setup with total items and page size, handling page change events, and customizing page size. ```vue ``` -------------------------------- ### Install Zenless UI Package Source: https://github.com/chrischan13/zenless-ui/blob/main/README.EN.md This snippet shows how to install the Zenless UI package using pnpm. It is a prerequisite for using the library in your project. ```shell pnpm install zenless-ui -S ``` -------------------------------- ### Vue Tabs Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Illustrates the usage of the z-tabs component for creating tabbed interfaces. It shows basic tab setup and how to handle tab change events using Vue's ref and event listeners. ```vue ``` -------------------------------- ### Basic Zenless UI Setup in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Integrates the Zenless UI component library and its CSS into a Vue 3 application's main entry point. ```javascript // main.js import { createApp } from 'vue' import ZenlessUI from 'zenless-ui' import 'zenless-ui/dist/index.css' import App from './App.vue' const app = createApp(App) app.use(ZenlessUI) app.mount('#app') ``` -------------------------------- ### Dropdown Component with Commands in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Illustrates the Dropdown component, showing how to create basic dropdown menus and trigger actions based on user selection. It includes examples for both click and hover triggers, and a basic script setup for handling commands. ```vue ``` -------------------------------- ### Vue Slider Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Provides examples for the z-slider component, showcasing basic usage, configuration with min, max, and step values, disabled state, and handling value change events. ```vue ``` -------------------------------- ### Zenless UI Button Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Showcases various configurations of the Z-Button component, including different types, sizes, variants, states, and event handling. ```vue ``` -------------------------------- ### Vue Table and Table Column Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Illustrates the use of z-table and z-table-column components for displaying data in tabular format. It covers basic table setup, tables without borders, tables with custom content in columns using slots, and handling empty data states with custom text or slots. This component requires Vue.js and the Zenless UI library. ```vue ``` -------------------------------- ### Vue Switch Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the z-switch component, including basic toggling, different sizes (large, small), disabled state, and handling the change event to capture the switch's boolean state. ```vue ``` -------------------------------- ### Vue Card Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the implementation of the z-card component, including a basic card, a card with a custom header slot containing actions, and a card with both header and footer slots for structured content. ```vue ``` -------------------------------- ### Vue Form and Form Item Component Example Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the usage of z-form and z-form-item components for creating user input forms. It includes various input types like text, password, select, radio, checkbox, switch, and textarea, along with submit and reset buttons. It also shows an example of an inline form for search functionality. This component requires Vue.js and the Zenless UI library. ```vue ``` -------------------------------- ### Access and Modify Zenless UI Runtime Configuration Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates how to access and modify Zenless UI's global settings (bold, italic, locale) at runtime within a Vue component's setup function. ```javascript import { useZenless } from 'zenless-ui' export default { setup() { const zenless = useZenless() // Modify settings at runtime zenless.isBold = true zenless.isItalic = false zenless.locale = locale.ja return { zenless } } } ``` -------------------------------- ### Tooltip Component Usage in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the Tooltip component for providing contextual information on hover. Examples cover basic tooltips, tooltips with specified placement (e.g., 'top'), and tooltips using a content slot for richer HTML content. ```vue ``` -------------------------------- ### Vue Menu Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the implementation of a vertical menu and a menu with a select event handler using the z-menu component. It utilizes Vue's ref for managing active states and handles menu selection events. ```vue ``` -------------------------------- ### Vue Input Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the various configurations and features of the Vue Input component, including size variations, clearable functionality, password input, prefix/suffix icons, custom slots, textarea mode, event handling, and disabled/readonly states. It requires Vue.js and the Zenless UI library. ```Vue.js ``` -------------------------------- ### Vue Select and Option Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Illustrates the usage of the Vue Select and Option components, showcasing basic selection, size variants, clearable functionality, disabled states, custom empty text, event handling, and custom empty slots. This component requires Vue.js and the Zenless UI library. ```Vue.js ``` -------------------------------- ### Vue.js Radio Group Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates various ways to use the Z-Radio-Group and Z-Radio components in Vue.js. Includes basic radio selection, button-style radios, size variations, disabled options, and event handling for changes. Requires Vue.js and the Zenless UI library. ```vue ``` -------------------------------- ### Scrollbar Component Customization in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the Scrollbar component for creating custom scrollable areas. Includes examples of a scrollbar with a fixed height and content that overflows, as well as a scrollbar with its visibility hidden. ```vue ``` -------------------------------- ### Vue: Zenless UI Drawer Component Usage Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates how to use the `z-drawer` component in Vue.js, which shares a similar API to the `z-modal` component but is designed for slide-in panels. Examples include basic drawer usage and configuring a drawer with a custom width. ```vue ``` -------------------------------- ### Collapse Component with Events in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Shows the Collapse and Collapse-Item components for creating accordion-like interfaces. Includes examples for managing active sections using v-model and handling collapse change events to log the active panel names. ```vue ``` -------------------------------- ### Pattern Component for Backgrounds in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Illustrates the Pattern component, used for creating decorative background elements. Examples include applying predefined pattern types like 'grid' and 'chessboard', and using the pattern as a background layer for other content. ```vue ``` -------------------------------- ### Progress Component in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Shows the implementation of the Progress component for displaying loading or completion status. Examples include basic progress bars, bars with different color types (success, warning, danger), and bars with custom text labels. ```vue ``` -------------------------------- ### Vue.js Checkbox Group Component Examples Source: https://context7.com/chrischan13/zenless-ui/llms.txt Illustrates the usage of Z-Checkbox and Z-Checkbox-Group components in Vue.js. Features include single checkboxes, checkbox groups, button-style checkboxes, size variations, disabled states, and event handling for selections. Requires Vue.js and the Zenless UI library. ```vue ``` -------------------------------- ### Configure Zenless UI Globally with Options Source: https://context7.com/chrischan13/zenless-ui/llms.txt Sets up Zenless UI with global configuration options for text styling (bold, italic) and language localization during application creation. ```javascript import { createApp } from 'vue' import ZenlessUI, { locale } from 'zenless-ui' import 'zenless-ui/dist/index.css' import App from './App.vue' const app = createApp(App) // Configure global settings app.use(ZenlessUI, { isBold: false, // Use bold text globally (default: false) isItalic: true, // Use italic text globally (default: true) locale: locale.en // Set language (default: zhCn) }) app.mount('#app') ``` -------------------------------- ### Theme Constants and Utility Functions in Zenless UI Source: https://context7.com/chrischan13/zenless-ui/llms.txt Provides access to theme constants like sizes and colors, along with utility functions for generating IDs, validating values, and formatting numbers. Imports from 'zenless-ui/constants' and '@/utils'. Useful for consistent theming and common data manipulation tasks. ```javascript // Import constants import { zenlessSizes, zenlessColors } from 'zenless-ui/constants' // Available sizes const sizes = ['extra', 'large', 'small', 'mini'] // Available colors const colors = [ 'default', 'primary', 'success', 'danger', 'warning', 'info', 'ether', 'fire', 'electric', 'ice', 'physical' ] // Utility functions import { generateId, isValidValue, prefixNumber } from '@/utils' // Generate random ID const id = generateId() // Returns random number 0-9999 // Check if value is valid (not undefined, null, or NaN) const valid = isValidValue(someValue) // Prefix single digit numbers with zero const formatted = prefixNumber(5) // Returns "05" ``` -------------------------------- ### Internationalization Management in Zenless UI Source: https://context7.com/chrischan13/zenless-ui/llms.txt Manages supported languages and allows setting the locale globally or at runtime. Imports locale data from 'zenless-ui' and uses the 'useZenless' composable for dynamic locale changes. Requires 'zenless-ui' package. ```javascript // Available locales import { locale } from 'zenless-ui' // Supported languages const languages = { en: locale.en, // English zhCn: locale.zhCn, // Chinese (Simplified) ja: locale.ja, // Japanese ko: locale.ko, // Korean de: locale.de, // German fr: locale.fr, // French es: locale.es, // Spanish it: locale.it, // Italian ru: locale.ru, // Russian id: locale.id // Indonesian } // Set locale during installation app.use(ZenlessUI, { locale: locale.en }) // Change locale at runtime import { useZenless } from 'zenless-ui' const zenless = useZenless() zenless.locale = locale.ja // Switch to Japanese ``` -------------------------------- ### Icon and Backtop Components in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Shows the usage of the Icon component for displaying various icons with options for color, and the Backtop component which provides a button to scroll the page back to the top. ```vue ``` -------------------------------- ### Tag and Badge Components in Vue Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates the usage of Tag and Badge components. Includes basic tags with different types and badges with numerical values, maximum limits, and dot indicators. These components are used for categorizing information and displaying counts. ```vue ``` -------------------------------- ### Vue: Programmatic Message API with Zenless UI Source: https://context7.com/chrischan13/zenless-ui/llms.txt Demonstrates how to use the `useMessage` hook from 'zenless-ui' to display various types of messages programmatically. Supports default, success, warning, error, and custom duration messages, as well as messages configured via an object. ```vue ``` -------------------------------- ### Vue: Zenless UI Modal Component Configuration Source: https://context7.com/chrischan13/zenless-ui/llms.txt Illustrates the usage of the `z-modal` component in Vue.js, showcasing various configuration options. This includes basic modal display, custom width, fullscreen mode, hiding the footer or cancel button, custom button text, using footer slots, handling modal events, and disabling mask closability. ```vue ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.