Labels
A label is an attribute of a note which has a name and optionally a value.
Common use cases
- Metadata for personal use: Assign labels with optional values for categorization, such as
#year=1999,#genre="sci-fi", or#author="Neal Stephenson". This can be combined with Promoted Attributes to make their display more user-friendly. - Configuration: Labels can configure advanced features or settings (see reference below).
- Scripts and Plugins: Used to tag notes with special metadata, such as the "weight" attribute in the Weight Tracker.
Creating a label using the visual editor
- Go to the Attributes tab in the Right Sidebar.
- Press the (Add attribute) button at the end of the list, or via the button at the top-right of the section → Add new label.
While in the visual editor:
- Set the desired name.
- Optionally, set the value of the label. Labels can exist without a value.
- Children can inherit this relation, click the relation and check Inheritable. See Attribute Inheritance for more information.
Creating a label manually
In the Status bar, press the button to show the list of the attributes.
- Click the input box to focus it.
- To create a label called
myLabelwith no value, simply type#myLabel. - To create a label called
myLabelwith a valuevalue, simply type#myLabel=value. - If the value contains spaces, then the text must be quoted:
#myLabel="Hello world". - If the string contains quotes (regardless of whether it has spaces), then the text must be quoted with apostrophes instead:
#myLabel='Hello "world"'. - To create an inheritable label called
myLabel, simply write#myLabel(inheritable)for no value or#myLabel(inheritable)=valueif there is a value.
Predefined labels
This is a list of labels that Trilium natively supports.
| Label | Description |
|---|---|
disableVersioning | Disables automatic creation of Note Revisions for a particular note. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting. |
versioningLimit | Limits the maximum number of Note Revisions for a particular note, overriding the global settings. |
calendarRoot | Marks the note which should be used as root for Day Notes. Only one should be marked as such. |
archived | Hides notes from default search results and dialogs. Archived notes can optionally be hidden in the Note Tree. |
excludeFromExport | Excludes this note and its children when exporting. |
run, runOnInstance, runAtHour | See Backend Events. |
disableInclusion | Scripts with this label won't be included into parent script execution. |
sorted, sortDirection, sortFoldersFirst, sortNatural, sortLocale, top, bottom | Manages automatic/permanent sorting. See Sorting Notes. |
hidePromotedAttributes | Hide Promoted Attributes on this note. Generally useful when defining inherited attributes, but the parent note doesn't need them. |
readOnly | Marks a note to always be read-only, if it's a supported note (text, code, mermaid). |
autoReadOnlyDisabled | Disables automatic read-only mode for the given note. |
appCss | Marks CSS notes which are loaded into the Trilium application and can thus be used to modify Trilium's looks. See Custom app-wide CSS for more info. |
appTheme | Marks CSS notes which are full Trilium themes and are thus available in Trilium options. See Theme development for more information. |
appThemeBase | Set to next, next-light, or next-dark to use the corresponding TriliumNext theme (auto, light or dark) as the base for a custom theme, instead of the legacy one. See Customize the Next theme for more information. |
customFont | Marks a font as selectable in the Options → Appearance font selection. See Personalizing the font. |
cssClass | Value of this label is then added as CSS class to the node representing given note in the Note Tree. This can be useful for advanced theming. Can be used in template notes. |
iconClass | value of this label is added as a CSS class to the icon on the tree which can help visually distinguish the notes in the tree. Example might be bx bx-home - icons are taken from boxicons. Can be used in template notes. |
pageSize | Specifies the number of items per page in Note List. |
customRequestHandler | See Custom Request Handler. |
customResourceProvider | See Custom Resource Providers. |
widget | Marks this note as a custom widget which will be added to the Trilium component tree. See Custom Widgets for more information. |
searchHome | New search notes will be created as children of this note (see Saved Search). |
workspace and related attributes | See Workspaces. |
inbox | Default inbox location for new notes. See Note Inbox for more information. |
sqlConsoleHome | Default location of SQL Console saved queries. |
bookmarked | Indicates this note is a bookmark. |
bookmarkFolder | Note with this label will appear in bookmarks, or on the launch bar when dropped onto it, as a folder (allowing access to its children). The Show as a folder option in the button's context menu toggles it. See Bookmarks for more information. |
bookmarkOpenMode | Where a click on the note's button in the launch bar opens it: currentTab (the default), newTab, newSplit, newWindow or quickEdit. Applies to bookmarks, notes dropped onto the launch bar and the notes in a bookmark folder. The Open mode submenu in the button's context menu sets it, as an inheritable label on a folder so that the notes in it follow. See Bookmarks for more information. |
share* | See the attribute reference in Sharing. |
displayRelations, hideRelations | Comma delimited names of relations which should be displayed/hidden in a Relation Map (both the note type and the Note Map (Link map, Tree map) general functionality). |
titleTemplate | Default title of notes created as children of this note. This value is evaluated as a JavaScript string and thus can be enriched with dynamic content via the injected now and parentNote variables. See Default Note Title for more info. |
template:titleTemplate | Set on a template note: default title of notes created from the template, taking precedence over the parent's titleTemplate. Evaluated the same way as titleTemplate. See Default Note Title. |
template | This note will appear in the selection of available template when creating new note. See Templates for more information. |
color | defines color of the note in note tree, links etc. Use any valid CSS color value like 'red' or #a13d5f Note: this color may be automatically adjusted when displayed to ensure sufficient contrast with the background. |
keyboardShortcut | Defines a keyboard shortcut which will immediately jump to this note. Example: 'ctrl+alt+e'. Requires frontend reload for the change to take effect. |
keepCurrentHoisting | Opening this link won't change hoisting even if the note is not displayable in the current hoisted subtree. |
executeButton | Title of the button which will execute the current code note |
executeDescription | Longer description of the current code note displayed together with the execute button |
excludeFromNoteMap | Notes with this label will be hidden from the Note Map. |
excludeFromLlm | Hides this note from the AI chat and the MCP server. Make it inheritable to hide the notes below it as well. See Privacy. |
newNotesOnTop | New notes will be created at the top of the parent note, not on the bottom. |
hideChildrenOverview | Hides the Note List for that particular note. |
subtreeHidden | Hides all child notes of this note from the tree, displaying a badge with the count of hidden children. Children remain accessible via search or direct links. |
printLandscape | When exporting to PDF, changes the orientation of the page to landscape instead of portrait. |
printPageSize | When exporting to PDF, changes the size of the page. Supported values: A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger. |
printScale, printMargins | Additional printing options, generally configured through the Printing & Exporting as PDF dialog. |
geolocation | Indicates the latitude and longitude of a note, to be displayed in a Geo Map. |
geoShape | Indicates the coordinates for the points of a shapec drawn on the Geo Map (e.g. area, rectangle, circle). |
map:* | Defines specific options for the Geo Map. |
calendar:* | Defines specific options for the Calendar. |
viewType | Sets the view of child notes (e.g. grid or list). See Note List for more information. |
webViewSrc | Defines the URL of the Web View. |
tabWidth, indentWithTabs, wrapLines | Per-note Code editor settings: indentation width, indent with tabs vs. spaces, and word wrapping. See Code. |
datePattern, weekPattern, monthPattern, quarterPattern, yearPattern | Customizes the title naming pattern of day / week / month / quarter / year notes. See Day Notes. |
enableWeekNote, enableQuarterNote | Enables optional week and quarter notes in the calendar hierarchy; set on the calendar root. See Day Notes. |
fullContentWidth | Expands the note to the full editor width, ignoring the configured content width (useful for wide tables). See Content width. |
iconPack | Identifies a custom icon pack by its prefix. See Creating an icon pack. |
clipperInbox | Overrides the default location where the Web Clipper saves clippings (defaults to the day note). See Web Clipper. |
docName , docUrl | Used internally for the in-app help. |
aiQuickAction | Defines a custom prompt to be used for the In-editor AI assistant's quick actions. |