You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add comprehensive theme system documentation
- Update README with theme system overview and examples
- Add complete THEME_SYSTEM.md guide covering:
- Theme plugin lifecycle (onThemeEnable/onThemeDisable)
- Layout slot overrides with createLayoutSlot()
- Style context with StyleProvider and useStyles()
- Static vs dynamic plugins comparison
- Complete dark theme plugin example
- Best practices and migration guide from v0.1.0
- API reference for theme-related functions
- Clarify plugin types in README (dynamic, static, theme)
- Add dark-theme-plugin to examples list
Copy file name to clipboardExpand all lines: README.md
+144-5Lines changed: 144 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# React PKL
2
2
3
-
A **typesafe plugin system for React applications** written in TypeScript. React PKL allows you to extend React applications from external sources through a robust, type-safe plugin architecture.
3
+
A **typesafe plugin system for React applications** written in TypeScript. React PKL allows you to extend React applications from external sources through a robust, type-safe plugin architecture with advanced theming support.
@@ -9,10 +9,13 @@ A **typesafe plugin system for React applications** written in TypeScript. React
9
9
10
10
React PKL is designed for **SDK developers** who want to create extensible React applications. It provides the foundation for building plugin systems where:
11
11
12
-
- Plugins can extend the UI through defined **slots**
12
+
- Plugins can extend the UI through defined **slots** and **layout overrides**
13
13
- Plugins receive a **typesafe context** from the host application
14
+
-**Theme plugins** can override entire layout components with custom styling
15
+
-**Static plugins** work without lifecycle management (perfect for themes)
14
16
- Resources are **automatically cleaned up** when plugins are disabled
15
17
- Plugins can be managed **locally** or fetched from a **remote source**
18
+
-**Style context** provides type-safe access to theme variables
16
19
17
20
## 📦 Packages
18
21
@@ -292,6 +295,131 @@ Get all components registered for a slot:
0 commit comments