import{_ as t,a,b as h,ag as r}from"./chunks/framework.BcrMLAmg.js";const p=JSON.parse('{"title":"BaseElement","description":"","frontmatter":{},"headers":[],"relativePath":"references/plugins/theme.md","filePath":"references/plugins/theme.md","lastUpdated":1757844696000}'),l={name:"references/plugins/theme.md"};function o(s,e,n,m,i,d){return h(),a("div",null,e[0]||(e[0]=[r('
This is the theme plugin. It provides a theming system that allows for consistent styling across elementswith support for inheritance, named styles, and dynamic theme switching.
| Method | Returns | Description |
|---|---|---|
| BaseElement:applyTheme | BaseElement | Applies theme styles to the element |
| BaseElement:getTheme | table | Gets theme properties for the element |
Applies the current theme to this element
self BaseElement The element to apply theme toapplyToChildren boolean ? Whether to apply theme to child elements (default: true)BaseElement self The element instanceGets the theme properties for this element
self BaseElement The element to get theme fortable styles The theme propertiesThe Theme API provides methods for managing themes globally
| Method | Returns | Description |
|---|---|---|
| ThemeAPI.setTheme | - | Sets a new theme |
| ThemeAPI.getTheme | table | Gets the current theme |
| ThemeAPI.loadTheme | - | Loads theme from JSON file |
Sets the current theme
newTheme table The theme configuration to setGets the current theme configuration
table theme The current theme configurationLoads a theme from a JSON file
path string Path to the theme JSON file