### Button Basic Usage Example Source: https://github.com/kingdee/kingdee-web-component-document/blob/main/src/Button/index.en-US.md Demonstrates the basic usage of the Kingdee UI Button component. It shows how to import and render a button, and includes examples in JSX, HTML, and CSS for different integration needs. The JavaScript example shows event handling for button clicks. ```javascript import { KingdeeElement } from '@kdcloudjs/kwc'; export default class ButtonBasic extends KingdeeElement { clickedButtonLabel; handleClick(event) { this.clickedButtonLabel = event.target.label; } } ``` ```html ``` ```css body { color: red; } ``` -------------------------------- ### Card Component Examples (React) Source: https://context7.com/kingdee/kingdee-web-component-document/llms.txt Provides examples of the KWC Card component, highlighting its structure with optional header, title, icon, footer, and action slots for displaying content. ```tsx import { Card } from 'kwc'; // Basic card // Card with title // Card with icon // Card without header // Card with custom actions // Card with footer // Card with custom title slot ``` -------------------------------- ### Install and Develop Kingdee Web Components Source: https://github.com/kingdee/kingdee-web-component-document/blob/main/README.md This section details the commands for managing dependencies, developing the library using documentation demos, and building the source code. It also includes commands for building and previewing the documentation locally. ```bash # install dependencies $ yarn install # develop library by docs demo $ yarn start # build library source code $ yarn run build # build library source code in watch mode $ yarn run build:watch # build docs $ yarn run docs:build # Locally preview the production build. $ yarn run docs:preview # check your project for potential problems $ yarn run doctor ``` -------------------------------- ### Spin Component Examples (React) Source: https://context7.com/kingdee/kingdee-web-component-document/llms.txt Demonstrates the KWC Spin component for loading indicators, covering configurations like size, alternative text, controlled loading state, delay, and custom indicators. ```tsx import { Spin } from 'kwc'; // Basic loading spinner // Different sizes // Spinner with text // Controlled loading state // Delayed spinner (shows after 3 seconds) // Custom loading indicator ``` -------------------------------- ### Switch Component Examples (React) Source: https://context7.com/kingdee/kingdee-web-component-document/llms.txt Demonstrates the usage of the KWC Switch component with different configurations such as default, size variants, disabled state, loading state, and label positioning. ```tsx import { Switch } from 'kwc'; // Basic switch // Different sizes // Disabled state // Loading state // Switch with label // Label positioning ``` -------------------------------- ### InputNumber Component Examples (React) Source: https://context7.com/kingdee/kingdee-web-component-document/llms.txt Illustrates the KWC InputNumber component with features like stepper controls, counter style, size variants, precision control, and min/max constraints. ```tsx import { InputNumber } from 'kwc'; // Basic input number with stepper // Counter style stepper // Different sizes // Precision control with decimal steps ``` -------------------------------- ### Render Kingdee Button Component in React Source: https://context7.com/kingdee/kingdee-web-component-document/llms.txt Demonstrates how to use the Kingdee Button component within a React application. Shows examples of different variants, sizes, and states like disabled and loading. Requires the 'kwc' library to be installed. ```tsx import { Button } from 'kwc'; // Basic button variants
// Button with icon
// Different sizes
// Disabled and loading states