@aracna/core - v1.5.0
    Preparing search index...

    Class Appearence

    The Appearence class manages the theme of anything that can have an appearence.

    • The theme will persist to a storage of your choice, by default it will be stored in memory.
    • The default theme is system, which means that the theme will be dark or light depending on the system theme.

    Aracna Reference

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    maxListeners: number
    storage: Storage

    The storage that will be used to store the theme.

    storageKey: string

    The key that will be used to store the theme.

    theme: Theme

    The theme, can be dark, light or system.

    Accessors

    Methods

    • Retrieves the theme from the storage and sets it.

      Returns Promise<boolean>

    • Registers the theme event listener in environments that support it.

      Returns void

    • Toggles the theme between dark and light. If the theme is set to system, it will be set to dark or light depending on the system theme.

      Returns this