Fires before the card is clicked. Set Cancel = true to prevent
the CardClicked event from firing.
Fires before the "Open Record" button is clicked. Set Cancel = true
to prevent the OpenRequested event from firing.
Fires after the card is clicked (if not canceled).
CSS class to apply to the outer container for custom styling.
The effective card template (custom or auto-generated)
Pre-resolved EntityInfo object. Takes precedence over EntityName.
Use this when you already have the EntityInfo to avoid a redundant lookup.
Resolved entity display name
The entity icon class (from vector metadata or entity info)
The entity name (e.g., "Members"). Used to look up EntityInfo from
the MJ Metadata cache. Mutually exclusive with Entity — if both are
provided, Entity takes precedence.
Maximum number of display fields in the card body. Only applies when using the auto-generated template.
Fires when the "Open Record" button is clicked (if not canceled).
If specified, this provider will be used for communication and for all metadata purposes. By default, if not provided, the Metadata and RunView classes are used for this and the default GraphQLDataProvider is used which is connected to the same back-end MJAPI instance as the Metadata and RunView classes. If you want to have this component connect to a different MJAPI back-end, create an instance of a ProviderBase sub-class like GraphQLDataProvider/etc, and configure it as appropriate to connect to the MJAPI back-end you want to use, and then pass it in here.
The record data as a plain key-value object. Works with both full entity
records (record.GetAll()) and sparse vector metadata.
Fields not present in the record are gracefully skipped in the display.
The resolved EntityInfo (from Entity input or EntityName lookup)
Whether to show the entity icon/avatar.
Whether to show field labels alongside values.
Whether to show the "Open Record" button.
Custom card template. When provided, overrides the auto-generated template.
Use GenerateCardTemplate() from the types module to build one programmatically.
The combined title string
Visual variant controlling size, layout, and detail level.
StaticɵdirStaticɵfacGet a deterministic color for the avatar based on the record
Get the description value
Get the resolved display fields, respecting maxFields for variant
Check if a thumbnail is available
Get initials from the title for avatar fallback
Returns either the default Metadata provider or the one specified in the Provider property, if it was specified
Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified
Returns either the default RunReport provider or the one specified in the Provider property, if it was specified
Returns either the default RunView provider or the one specified in the Provider property, if it was specified
Whether to show the avatar based on variant and input
Whether to show field labels based on variant and input
Get the subtitle value
Whether the thumbnail is an icon class
Whether the thumbnail is an image URL
Get the thumbnail URL or icon class
Get the label for a field
A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.
The changed properties.
InternalHandle card click with cancelable before/after pattern
InternalHandle open button click with cancelable before/after pattern
MJEntityCardComponent— A generic, metadata-driven entity record card.Renders a single entity record as a visual card with automatically prioritized fields based on MemberJunction entity metadata (
IsNameField,DefaultInView,Sequence). Designed to work with both full entity records and sparse vector metadata from the Knowledge Hub.Variants
compact— Tooltip-sized. Title + 2-3 key fields. No avatar.card— Grid card. Avatar + title + subtitle + display fields + badge.detail— Full panel. All available fields with labels.Field Resolution
IsNameFieldfields combined in Sequence orderDefaultInView=truesorted by SequenceEvents
All interactions follow the
BeforeXXX/AfterXXXcancelable event pattern. Setevent.Cancel = truein aBeforeXXXhandler to prevent the default action.Example
Selector
mj-entity-card