About umbraco-property-action
umbraco-property-action is a skill for Umbraco backoffice developers building secondary actions for property editors. It guides creation of manifest-based actions, including value transformations and modal-opening actions.
Key features
- 01Add buttons beside property labels
- 02Target selected or all property editors
- 03Read and modify property values
- 04Open modals from actions
- 05Generate action manifests and classes
Use cases
- 01Add a shortcut to a property editor
- 02Transform a property's current value
- 03Launch a modal from a property action
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ umbraco/ umbraco-cms-backoffice-skills --skill umbraco-property-actionAfter installing, type/umbraco-property-actionin Claude Code to confirm it loaded.
Details
From the project READMEUmbraco Property Action
What is it?
Property Actions are buttons that appear next to property labels in the backoffice, providing secondary functionality for property editors. They expand to show available actions when clicked. Property Actions let you add auxiliary features to existing property editors without modifying the editors themselves - useful for shortcuts, transformations, or context-specific operations.
Documentation
Always fetch the latest docs before implementing:
- Main docs: https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/property-editors/property-actions
- Property Editors: https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/property-editors
- Foundation: https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/foundation
- Extension Registry: https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/extending-overview/extension-registry
Related Foundation Skills
-
Context API: When accessing property context to read/modify values
- Reference skill:
umbraco-context-api
- Reference skill:
-
Modals: When the action opens a modal dialog
- Reference skill:
umbraco-modals
- Reference skill:
Workflow
- Fetch docs - Use WebFetch on the URLs above
- Ask questions - Which property editors to target? What action to perform?
- Generate files - Create manifest + action class based on latest docs
- Explain - Show what was created and how to test
Minimal Examples
Manifest (manifests.ts)
import type { ManifestPropertyAction } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestPropertyAction = {
type: 'propertyAction',
alias: 'My.PropertyAction.Clear',
name: 'Clear Value',
api: () => import('./clear-action.js'),
forPropertyEditorUis: ['Umb.PropertyEditorUi.TextBox', 'Umb.PropertyEditorUi.TextArea'],
meta: {
icon: 'icon-trash',
label: 'Clear',
},
weight: 100,
};
export const manifests = [manifest];
Action Implementation (clear-action.ts)
import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action';
import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
export class ClearPropertyAction extends UmbPropertyActionBase {
constructor(host: UmbControllerHost, args: any) {
super(host, args);
}
async execute() {
const propertyContext = await this.getContext(UMB_PROPERTY_CONTEXT);
propertyContext?.setValue('');
}
}
export default ClearPropertyAction;
Action That Transforms Value
import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action';
import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property';
export class UppercasePropertyAction extends UmbPropertyActionBase {
async execute() {
const propertyContext = await this.getContext(UMB_PROPERTY_CONTEXT);
const currentValue = propertyContext?.getValue() as string;
if (currentValue) {
propertyContext?.setValue(currentValue.toUpperCase());
}
}
}
export default UppercasePropertyAction;
Action with Modal
import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action';
import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property';
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
export class PickerPropertyAction extends UmbPropertyActionBase {
async execute() {
const propertyContext = await this.getContext(UMB_PROPERTY_CONTEXT);
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
const modal = modalManager.open(this, MY_PICKER_MODAL, {
data: {
currentValue: propertyContext?.getValue(),
},
});
const result = await modal.onSubmit();
if (result?.value) {
propertyContext?.setValue(result.value);
}
}
}
export default PickerPropertyAction;
Target All Property Editors
const manifest: ManifestPropertyAction = {
type: 'propertyAction',
alias: 'My.PropertyAction.Copy',
name: 'Copy to Clipboard',
api: () => import('./copy-action.js'),
// Omit forPropertyEditorUis to target all editors
meta: {
icon: 'icon-documents',
label: 'Copy',
},
};
Common Property Editor UI Aliases
Umb.PropertyEditorUi.TextBoxUmb.PropertyEditorUi.TextAreaUmb.PropertyEditorUi.RichTextUmb.PropertyEditorUi.IntegerUmb.PropertyEditorUi.DecimalUmb.PropertyEditorUi.ContentPickerUmb.PropertyEditorUi.MediaPicker
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.