-
Creating a custom theme
Organization is an important aspect of managing a knowledge base. When developing a new theme or importing an existing one it's a good idea to keep them into one place.
As such, the first step is to create a new note to gather all the themes.
Then, in the attributes of the note (the button in the Status bar), set the #appTheme label to any name. This is the name that shows up in the appearance section of the settings.
-
Customize the Next theme
By default, any custom theme will be based on the legacy light theme. To use the TriliumNext theme instead, add the #appThemeBase=next attribute onto the existing theme. The appTheme attribute must also be present.
The appThemeBase label can be set to one of the following values:
Do note that the TriliumNext theme has a few more overrides than the legacy theme. Due to that, it is recommended to use #trilium-app with a next theme instead of the :root of a legacy theme.
-
Reference
The mobile layout is different than the one on the desktop. Use body.mobile and body.desktop to differentiate between them.
Do note that there is also a “tablet mode” in the mobile layout. For that particular case media queries are required:
The user can select between vertical layout (the classical one, where the launcher bar is on the left) and a horizontal layout (where the launcher bar is on the top and tabs are full-width).
Different styles can be applied by using classes at body level:
-
Custom app-wide CSS
It is possible to provide a CSS file to be used regardless of the theme set by the user.
The quickest way to create one is Insert child note → Code → Custom CSS in the Note tree contextual menu.
Alternatively, create a Code note manually, set the language to CSS and apply the #appCss label.
Adding a new app CSS note or modifying an existing one does not immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh the page first.
-
Creating an icon pack
This page explains, step‑by‑step, how to create a custom icon pack. For a general description of how to use already existing icon packs, see Icon Packs.
First read the quick flow to get the overall steps. After that there is a concrete example (Phosphor) with a small Node.js script you can run to generate the manifest.
The first step is to analyze if the icon set being packed can be integrated into Trilium.
Trilium only supports font-based icon sets, with the following formats: