llms.txt: machine-readable documentation index. Markdown version of this page is also available.

YouTrack Developer Portal Help

Widgets

A widget is a custom object that you can embed in one of the dedicated extension points in the YouTrack UI. Each app can contain one or more widgets.

Widget code runs in the browser and can use JavaScript arrays and built-in Sets.

Sample Widget

An example of a custom widget shown in the area above the custom field panel.

Here is an example of a widget description in the app manifest:

"widgets": [ { "key": "fields-first", "name": "Sample Widget", "description": "Optional description for the issue view widget", "guard": "({entity}) => entity.fields.State?.value === 'Fixed'", "extensionPoint": "ISSUE_FIELD_PANEL_FIRST", "indexPath": "index.html", "iconPath": "icon.png", "permissions": ["READ_USER"] } ]

This sample widget is embedded in the custom field panel in issue view and appears when the issue is in the Fixed state.

The widget content is stored in the dedicated index.html file. Here is sample code for the widget content:

<!doctype html> <html> <head> <link rel="stylesheet" href="https://unpkg.com/@jetbrains/ring-ui-built@6/components/style.css"> <link rel="stylesheet" href="../index.css"> </head> <body class="plugin" style="padding: 0; overflow: hidden;"> <div id="root"> </div> <script type="module"> const host = await YTApp.register(); console.log('init cat widget', host) var viewportWidth = window.innerWidth || document.documentElement.clientWidth; var viewportHeight = window.innerHeight || document.documentElement.clientHeight; const img = document.createElement('img'); img.src = `https://cataas.com/cat?width=${viewportWidth}`; img.width = viewportWidth; img.height = viewportHeight; img.style = `object-fit: cover;`; document.getElementById('root').appendChild(img); img.onclick = () => { host.enterModalMode(); }; </script> </body> </html>

For more examples of widgets in different places in the UI, refer to Extension Points for Widgets.

Extension Points

A widget can be embedded in different places in the YouTrack UI, for example, in an issue, an article, or in the main menu. The particular place where a widget appears is defined by the extension point the widget is using.

For full reference on widget extension points, see Extension Points for Widgets.

Widget Size

YouTrack hosts widgets in sandboxed iframes. For most extension points, YouTrack sizes the iframe based on its location in the UI and, when provided, the widget's expectedDimensions manifest field.

In YouTrack 2026.2 and later, page-level widgets fill the available page space by default when expectedDimensions.height is not set. This applies to widgets embedded in the ADMINISTRATION_MENU_ITEM, MAIN_MENU_ITEM, PROJECT_TAB, PROJECT_SETTINGS, HELPDESK_CHANNEL, and USER_PROFILE_SETTINGS extension points.

Use the widget's own CSS to control its root element and content layout. This lets the widget define internal scrollable containers, sticky elements, and responsive page layouts. Set expectedDimensions.height only when you need a fixed pixel-height display hint. For details, see Widgets.

Conditional Widgets

If you want to show a widget only when some requirements are met and hide it otherwise, use guard conditions. To define a condition for showing a widget, add a guard function to the widget description in the app manifest.

Widget guards are JavaScript functions that check conditions related to YouTrack entities and their properties. For the widget to be shown, the function must return true.

Here is an example of a guard condition for showing a widget. This guard function checks if the issue is in the Fixed state and shows the widget only if this condition checks to true.

"guard": "({entity}) => entity.fields.State?.value === 'Fixed'"

For more details and reference on widget guards, see Conditional Widgets.

Widget Configuration

The schema for saved widget configuration determines which values the widget can persist.

For widgets at the DASHBOARD_WIDGET and MARKDOWN extension points, declare a configuration schema through settingsSchemaPath in the widget manifest. Read and save values with host.readConfig() and host.storeConfig().

Widget configuration supports string, boolean, integer, and number settings, single entity references, and arrays of entity references. For an entity-array setting, declare "type": "object" and x-entity in the items schema. Primitive and ordinary object array settings are unsupported.

The app's root settings.json file has a separate schema and supports additional array shapes. Its array support does not apply to settingsSchemaPath.

For data that should remain in the user's browser, use host.storage. For collection types and storage choices, see Arrays and Collections.

24 November 2026