Skip to content

@vttforge/core / BaseItemSheet

Function: BaseItemSheet() ​

BaseItemSheet<TDocument>(): SheetBaseCtor<TDocument>

Build the BaseItemSheet for the current Foundry runtime.

Type Parameters ​

TDocument ​

TDocument extends ItemLike<unknown> = ItemLike<Record<string, unknown>>

Returns ​

SheetBaseCtor<TDocument>

Example ​

ts
class WeaponSheet extends BaseItemSheet() {
  static override DEFAULT_OPTIONS = foundry.utils.mergeObject(
    super.DEFAULT_OPTIONS,
    { classes: ['my-system'], position: { width: 540 } },
    { inplace: false }, // never edit the parent's static options in place
  );
  static PARTS = { ... };
  static TABS = {
    primary: {
      tabs: [
        { id: 'description', group: 'primary', label: 'Description' },
        { id: 'details', group: 'primary', label: 'Details' },
      ],
      initial: 'description',
    },
  };
}

MIT licensed.