Usage
Signature:
interface CActionCardElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { CActionCardElement } from "oj-c/action-card";
//For the transpiled javascript to load the element's module, import as below
import "oj-c/action-card";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Slots
JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.
Attributes
-
bg-color :"body"|"neutral-0"|"neutral-10"|"neutral-20"|"neutral-30"|"neutral-170"|"neutral-180"|"neutral-190"|"neutral-200"|"brand-10"|"brand-20"|"brand-30"|"danger-10"|"danger-20"|"danger-30"|"warning-10"|"warning-20"|"warning-30"|"success-10"|"success-20"|"success-30"|"info-10"|"info-20"|"info-30"
-
Specifies the background color of the Action Card using the supported JET card background design token palette. Higher-numbered neutral tokens, neutral-170 through neutral-200, are the darker neutral values and apply a contrasting color scheme to token-based card content.
Supported Values:
Value Description bodyUse the current theme body background color. neutral-0Use the neutral-0 palette color. neutral-10Use the neutral-10 palette color. neutral-20Use the neutral-20 palette color. neutral-30Use the neutral-30 palette color. neutral-170Use the neutral-170 palette color. neutral-180Use the neutral-180 palette color. neutral-190Use the neutral-190 palette color. neutral-200Use the neutral-200 palette color. brand-10Use the brand-10 palette color. brand-20Use the brand-20 palette color. brand-30Use the brand-30 palette color. danger-10Use the danger-10 palette color. danger-20Use the danger-20 palette color. danger-30Use the danger-30 palette color. warning-10Use the warning-10 palette color. warning-20Use the warning-20 palette color. warning-30Use the warning-30 palette color. success-10Use the success-10 palette color. success-20Use the success-20 palette color. success-30Use the success-30 palette color. info-10Use the info-10 palette color. info-20Use the info-20 palette color. info-30Use the info-30 palette color. Names
Item Name Property bgColorProperty change event bgColorChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-bg-color-changed
Events
-
ojAction
-
Triggered when a card is clicked, whether by keyboard, mouse, or touch events. To meet accessibility requirements, the only supported way to react to the click is to listen for this event.
See Events and Listeners for additional information.
Methods
-
getProperty(property) : {any}
-
Retrieves the value of a property or a subproperty.
Parameters:
Name Type Description propertystring The property name to get. Supports dot notation for subproperty access. Returns:
- Type
- any
-
setProperties(properties) : {void}
-
Performs a batch set of properties.
Parameters:
Name Type Description propertiesobject An object containing the property and value pairs to set. Returns:
- Type
- void
-
setProperty(property, value) : {void}
-
Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a corresponding event.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. valueany The new value to set the property to. Returns:
- Type
- void