Creating UI Extensions
StellarStack plugins can extend the web interface with custom UI components. Add tabs to server pages, widgets to dashboards, admin pages, and settings panels.UI Extension Points
Plugins can add UI components at four extension points:- Server Tabs - Tabs on the server management page
- Server Widgets - Dashboard widgets on the server overview
- Admin Pages - Full pages in the admin panel
- Settings Panels - Plugin configuration UI
Defining UI Extensions
Declare UI components in your plugin manifest:Declarative UI Schema
For common UI patterns, use declarative schemas instead of React components. This provides better security and reduces boilerplate.Search and Install Pattern
Used by CurseForge, Modrinth, and Steam Workshop plugins:Form Pattern
For settings, configuration, or data entry:Data Table Pattern
For displaying lists with actions:Stats Display Pattern
For metrics and statistics:Compound Schema
Combine multiple schemas:Field Types
Available field types for forms:String Field
Number Field
Boolean Field
Select Field
Textarea Field
Password Field
React Components
For complex UIs, create React components:Server Tab Component
tsx
Server Widget Component
tsx
Admin Page Component
tsx
Settings Panel Component
tsx
Widget Sizes
Server widgets support three sizes:small- 1x1 grid (single stat, compact info)medium- 2x1 grid (default, multiple stats)large- 2x2 grid (charts, tables)
Icons
Use Lucide icon names for tabs and admin pages:flame- Fire icon (modpacks, hot content)leaf- Leaf icon (Modrinth)gamepad- Gamepad icon (Steam Workshop)megaphone- Megaphone icon (announcements)chart- Chart icon (analytics)settings- Settings iconusers- Users iconserver- Server icon
Action Handlers
UI schemas reference action IDs. Define these actions in your manifest:Example: Complete CurseForge Plugin UI
Best Practices
1. Use Declarative Schemas When Possible
Declarative schemas are more secure and maintainable:2. Provide Clear Labels and Descriptions
3. Validate User Input
4. Show Confirmation for Dangerous Actions
5. Use Appropriate Widget Sizes
Next Steps
- Plugin API Reference - Complete API documentation
- Plugin Hooks - Available events and hooks