preact-ui

Implement MVVM structure for Preact pages and components.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/prachwal-archive/preact-ui --skill preact-ui-prachwal-archive
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preact-ui
Source: https://github.com/prachwal-archive/preact-ui/tree/main
Command: npx skills add https://github.com/prachwal-archive/preact-ui --skill preact-ui-prachwal-archive

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Preact UI design often lacks a clear, scalable architecture; this Skill provides a disciplined MVVM approach that separates data, state, and rendering to improve maintainability and collaboration.

Core Features & Use Cases

  • Defines a three-layer MVVM structure (Model, ViewModel, View) to organize code for Preact applications.
  • Provides a practical directory layout and extensive references for signals, hooks, routing, accessibility, and testing.
  • Supports building component libraries, feature slices, and route-level views with consistent patterns.

Quick Start

Ask it to scaffold a MVVM-based Preact project using the directory layout shown in SKILL.md.

Frequently Asked Questions about preact-ui

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

FAQPage Schema
How do I structure a Preact application using MVVM for better maintainability?

Adopting MVVM in Preact separates your codebase into Model, ViewModel, and View layers. This pattern isolates data, state, and rendering logic to improve maintainability and team collaboration.

What is the best way to scaffold a Preact project with signals and routing?

Scaffold a MVVM-based Preact project by applying a structured directory layout that organizes feature slices and route-level views. This provides consistent patterns for integrating signals and routing.

Can I use this MVVM approach to refactor existing Preact components?

Yes, you can refactor existing Preact components by migrating their logic into a three-layer MVVM structure. This process reorganizes current rendering and state logic into defined Model, ViewModel, and View components.

Does the MVVM pattern work with Preact signals for state management?

Yes, the MVVM pattern integrates with Preact signals by managing reactive state within the ViewModel layer. Signals provide reactive primitives that bind the Model data directly to the View rendering.

How do I organize routing and accessibility in a Preact UI component system?

Organize routing and accessibility in a Preact component system by following established references within an MVVM architecture. This ensures route-level views and components maintain quality and compliance standards.

When should I avoid using MVVM for frontend UI design?

Avoid using MVVM for frontend UI design when a project is too small to justify the architectural overhead. If a simple component structure handles state and rendering efficiently, the three-layer separation may be unnecessary.