frontend-plugin-api: document that icons should be 24x24

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-15 17:54:37 +01:00
parent 1ec7e80635
commit cc3c035267
4 changed files with 7 additions and 2 deletions
@@ -52,7 +52,7 @@ export default createFrontendPlugin({
### `icon` option
The display icon of the plugin, used in page headers and navigation. The type is `IconElement` (`JSX.Element | null`) from `@backstage/frontend-plugin-api`.
The display icon of the plugin, used in page headers and navigation. The type is `IconElement` (`JSX.Element | null`) from `@backstage/frontend-plugin-api`. Icons should be exactly 24x24 pixels in size.
```tsx
export default createFrontendPlugin({
@@ -48,7 +48,7 @@ The `title` data reference can be used for defining the extension input/output o
| :---------: | :-----------: |
| `core.icon` | `IconElement` |
The `icon` data reference can be used for defining the extension input/output of icon elements. The type is `IconElement` (`JSX.Element | null`) from `@backstage/frontend-plugin-api`.
The `icon` data reference can be used for defining the extension input/output of icon elements. The type is `IconElement` (`JSX.Element | null`) from `@backstage/frontend-plugin-api`. Icons should be exactly 24x24 pixels in size.
### `routePath`
@@ -40,6 +40,10 @@ export type IconComponent = ComponentType<{
/**
* The type used for icon elements throughout Backstage.
*
* @remarks
*
* Icons should be exactly 24x24 pixels in size.
*
* @public
*/
export type IconElement = JSX.Element | null;
@@ -22,6 +22,7 @@ import { createExtensionDataRef } from './createExtensionDataRef';
/** @public */
export const coreExtensionData = {
title: createExtensionDataRef<string>().with({ id: 'core.title' }),
/** An icon element for the extension. Should be exactly 24x24 pixels. */
icon: createExtensionDataRef<IconElement>().with({ id: 'core.icon' }),
reactElement: createExtensionDataRef<JSX.Element>().with({
id: 'core.reactElement',