wok-ui-button

Create configurable wok-ui Button components with type-safe options.

Updated Sep 14, 2023
One-click install
npx skills add https://github.com/PeakTai/wok-ui --skill wok-ui-button
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wok-ui-button
Source: https://github.com/PeakTai/wok-ui/tree/main/skills/wok-ui-button
Command: npx skills add https://github.com/PeakTai/wok-ui --skill wok-ui-button

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

wok-ui 按钮模块为开发者提供一个可配置、可复用的按钮组件,解决在不同界面中按钮样式不一致、维护成本高的问题。

Core Features & Use Cases

  • 提供 Button 类型(primary/default/success/danger/warning)的丰富样式选择
  • 支持描边、块级、禁用、尺寸、固定宽度、图标及图标位置等选项
  • 适用于仪表板、表单、工具栏等需要一致按钮行为和外观的场景

Quick Start

Create a Button with the desired options (text, type, size, icon) and mount it to the page.

Frequently Asked Questions about wok-ui-button

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create consistent interactive buttons for web UI scenarios like dashboards and forms?

You can create consistent interactive buttons by using a configurable Button component that enforces type safety through a ButtonOpts interface. This ensures predictable UI behavior across dashboards, forms, and toolbars.

What button types and styling options are available for web development UI components?

Available button types include primary, default, success, danger, and warning. Styling options support outline, block, disabled, size, fixed width, icon, and icon position variations for versatile web UI interfaces.

Can I use an icon button with form integration in my web application?

Yes, the button component supports form integration through a formType variant and allows icon configuration with adjustable iconPosition. This enables seamless primary and secondary actions within form submissions.

What's the best way to configure block-level or fixed-width buttons for responsive web interfaces?

Configuring block-level or fixed-width buttons involves setting the block and width variants within the ButtonOpts interface. This approach maintains predictable UI behavior and consistent styling across responsive layouts.

Does the wok-ui button component require external dependencies to function?

No, the wok-ui button component operates with zero external dependencies. It functions independently to provide configurable, reusable button styling for web development scenarios without requiring additional libraries.

How do I handle disabled state and size variations for interactive buttons?

Interactive buttons handle disabled states and size variations through built-in component variants. Configuring the disabled and size options within the ButtonOpts interface ensures predictable behavior and consistent visual feedback.