| title | SharePoint Framework v1.18 release notes |
|---|---|
| description | Release notes for the SharePoint Framework v1.18 release |
| ms.date | 09/12/2023 |
| ms.localizationpriority | high |
This release focuses on new features within the Viva Connections side and evolving existing capabilities within the other areas on building Microsoft 365 solutions with SharePoint Framework.
Released: September 12, 2023
[!INCLUDE spfx-release-notes-common]
Install the latest official release of the SharePoint Framework (SPFx) by using the @latest tag
npm install @microsoft/generator-sharepoint@latest --globalIn the project's package.json file, identify all SPFx v1.17.x packages. For each SPFx package:
-
Uninstall the existing v1.17.x package:
npm uninstall @microsoft/{spfx-package-name}@1.17.x -
Install the new v1.18 package:
npm install @microsoft/{spfx-package-name}@latest --save --save-exact
[!INCLUDE spfx-release-upgrade-tip]
Related updated documentation for the 1.18 release:
- Designing Viva Connections custom cards for your dashboard
- Migrate Adaptive Card Extensions to SharePoint Framework 1.18
- Tutorial - Create a People Search Adaptive Card Extension
New samples showcasing the new Viva Connections features:
- Start a Chat Text Box input Adaptive Card Extension
- Prompt Survey Adaptive Card Extension
- People Search Adaptive Card Extension
Video in YouTube showcasing the new template options for Viva Connections
- Introduction to new features and capabilities within SPFx 1.18
- Introducing new Microsoft Viva Connection card layouts in the SharePoint Framework 1.18
SharePoint Framework solutions now support NodeJS v18 as the default version.
Developers can use Execute action for both Card View and Quick View actions.
We introduce new default class for Adaptive Card Extensions Card Views. With these new class developers can specify a set of components that is rendered in a Card View.
For more information on the new designs, see Designing Viva Connections custom cards for your dashboard.
export abstract class BaseComponentsCardView<TProperties = {}, TState = {}, TParameters extends ComponentsCardViewParameters = ITextCardViewParameters> extends BaseCardView<TProperties, TState> {
abstract get cardViewParameters(): TParameters;
}Example usage:
export class CardView extends BaseComponentsCardView<
IHelloWorldAdaptiveCardExtensionProps,
IHelloWorldAdaptiveCardExtensionState,
ComponentsCardViewParameters
> {
public get cardViewParameters(): ComponentsCardViewParameters {
return BasicCardView({
cardBar: {
componentName: 'cardBar',
title: this.properties.title,
icon: {
url: this.properties.iconProperty
}
},
header: {
componentName: 'text',
text: 'Hello world!'
},
footer: {
componentName: 'cardButton',
title: 'Quick View',
action: {
type: 'QuickView',
parameters: {
view: QUICK_VIEW_REGISTRY_ID,
},
},
},
});
}
}With this release, we introduce more flexible way to configure Card Views for Adaptive Card Extensions. Developers can now "mix and match" components in a Card View configuration based on allowed set of variations.
Use new Generic Card Template in the generator to get started. Migration guide for existing projects is available here.
Developers can now use text input component in a body or footer of a Card View. For more information on the layout options, see Designing Viva Connections custom cards for your dashboard.
Note
The text input component is fully supported in the browser and in Teams desktop. Full support for Viva Connections mobile will be enabled later.
We introduce a new search Card View for Adaptive Card Extensions that is intended to be used for search scenarios. Use new Search Card Template in the generator to get started.
Note
The text input component is fully supported in the browser and in Teams desktop. Full support for Viva Connections mobile will be enabled later.
Developers can now use onChange event for TextInput and SearchBox components in Adaptive Card Extensions.
/**
* Text change event handler.
*/
onChange?: (newValue?: string) => void;Note
The onChange event for TextInput and SearchBox is fully supported in the browser and in Teams desktop. Full support for Viva Connections mobile will be enabled later.
Starting with this version, developers have access to hostContext in the AdaptiveCardExtensionContext object. This property allows to detect host's theme.
export type HostTheme = 'light' | 'dark' | undefined;
export interface IHostContext {
/**
*
* theme is used to define what the the current colour scheme for the VCM app. It has currently 2 values
light: If VCM is in light mode, we use the theme 'light',
dark: If VCM is in dark mode, we use the theme 'dark'
*/
theme: HostTheme;
}Starting from this version, React templates use Fluent UI React v8 instead of v7.
The default outline icon for Microsoft Teams hosted web parts is now transparent. This ensures that the default icon meets the Microsoft Teams design requirements for application.
SPFx solutions now support TypeScript v4.7.
BaseAdaptiveCardView- useBaseAdaptiveCardQuickViewinsteadtemplateproperty inBaseTemplateCardViewand its descendants
- #9010 - Placeholder
{tenantDomain}isn't replaced withSPFX_SERVE_TENANT_DOMAIN.
We're interested on your feedback around the release. Do let us know any findings or other feedback using the SPFx issue list.
Happy coding! Sharing is caring! 🧡


