Skip to main content

@backstage/frontend-plugin-api

Home > @backstage/frontend-plugin-api

Core API used by Backstage frontend plugins.

Functions

FunctionDescription
createApiExtension(options)
createAppRootElementExtension(options)Creates an extension that renders a React element at the app root, outside of the app layout. This is useful for example for shared popups and similar.
createAppRootWrapperExtension(options)Creates an extension that renders a React wrapper at the app root, enclosing the app layout. This is useful for example for adding global React contexts and similar.
createComponentExtension(options)
createComponentRef(options)
createExtension(options)
createExtensionDataRef(id)
createExtensionInput(extensionData, config)
createExtensionOverrides(options)
createExternalRouteRef(options)Creates a route descriptor, to be later bound to a concrete route by the app. Used to implement cross-plugin route references.
createNavItemExtension(options)Helper for creating extensions for a nav item.
createNavLogoExtension(options)Helper for creating extensions for a nav logos.
createPageExtension(options)Helper for creating extensions for a routable React page component.
createPlugin(options)
createRouteRef(config)Create a RouteRef from a route descriptor.
createRouterExtension(options)Creates an extension that replaces the router implementation at the app root. This is useful to be able to for example replace the BrowserRouter with a MemoryRouter in tests, or to add additional props to a BrowserRouter.
createSchemaFromZod(schemaCreator)
createSignInPageExtension(options)
createSubRouteRef(config)Create a SubRouteRef from a route descriptor.
createThemeExtension(theme)
createTranslationExtension(options)
ExtensionBoundary(props)
useAnalytics()Gets a pre-configured analytics tracker.
useComponentRef(ref)Returns the component associated with the given ref.
useRouteRef(routeRef)React hook for constructing URLs to routes.
useRouteRef(routeRef)React hook for constructing URLs to routes.
useRouteRefParams(_routeRef)React hook for retrieving dynamic params from the current URL.

Interfaces

InterfaceDescription
AppNodeA node in the AppTree.
AppNodeEdgesThe connections from this AppNode to other nodes.
AppNodeInstanceThe instance of this AppNode in the AppTree.
AppNodeSpecThe specification for this AppNode in the AppTree.
AppTreeThe app tree containing all AppNodes of the app.
AppTreeApiThe API for interacting with the AppTree.
BackstagePlugin
ComponentsApiAPI for looking up components based on component refs.
ConfigurableExtensionDataRef
CreateExtensionOptions
Extension
ExtensionBoundaryProps
ExtensionDefinition
ExtensionInput
ExtensionOverrides
ExtensionOverridesOptions
ExternalRouteRefRoute descriptor, to be later bound to a concrete route by the app. Used to implement cross-plugin route references.
IconsApiAPI for accessing app icons.
PluginOptions
RouteRefAbsolute route reference.
RouteResolutionApi
SubRouteRefDescriptor of a route relative to an absolute RouteRef.

Namespaces

NamespaceDescription
createApiExtension
createAppRootWrapperExtension
createComponentExtension
createNavItemExtension
createNavLogoExtension
createRouterExtension
createSignInPageExtension
createThemeExtension
createTranslationExtension

Variables

VariableDescription
analyticsApiRefThe API reference of AnalyticsApi.
AnalyticsContextProvides components in the child react tree an Analytics Context, ensuring all analytics events captured within the context have relevant attributes.
appTreeApiRefThe ApiRef of AppTreeApi.
componentsApiRefThe ApiRef of ComponentsApi.
coreComponentRefs
coreExtensionData
iconsApiRefThe ApiRef of IconsApi.
routeResolutionApiRefThe ApiRef of RouteResolutionApi.

Type Aliases

Type AliasDescription
AnalyticsApiThe Analytics API is used to track user behavior in a Backstage instance.
AnalyticsContextValueAnalytics context envelope.
AnalyticsEventRepresents an event worth tracking in an analytics system that could inform how users of a Backstage instance are using its features.
AnalyticsEventAttributesA structure allowing other arbitrary metadata to be provided by analytics event emitters.
AnalyticsTrackerRepresents a tracker with methods that can be called to track events in a configured analytics service.
AnyExtensionDataMap
AnyExtensionInputMap
AnyExternalRoutes
AnyRouteRefParamsCatch-all type for route params.
AnyRoutes
CommonAnalyticsContextCommon analytics context attributes.
ComponentRef
CoreErrorBoundaryFallbackProps
CoreNotFoundErrorPageProps
CoreProgressProps
ExtensionDataRef
ExtensionDataValuesConverts an extension data map into the matching concrete data values type.
FeatureFlagConfigFeature flag configuration.
FrontendFeature
IconComponentIconComponent is the common icon type used throughout Backstage when working with and rendering generic icons, including the app system icons.
PortableSchema
ResolvedExtensionInputConvert a single extension input into a matching resolved input.
ResolvedExtensionInputsConverts an extension input map into a matching collection of resolved inputs.
RouteFuncTS magic for handling route parameters.
RouteResolutionApiResolveOptions