Usage
Signature:
interface ActionCardElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { ActionCardElement } from "ojs/ojactioncard";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojactioncard";
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.
Styling
-
CSS Variables
-
Action Card CSS
Name | Description |
---|---|
--oj-action-card-scale-hover |
Action card hover scale |
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.
-
Default
-
The
Default
slot is the actions's body. It should not be explicitly named.Example
<oj-action-card> Default Card </oj-action-card>
Events
-
ojAction
-
Triggered when an action card is clicked. This will be triggered by keyboard events as well as mouse/touch events.
When double-clicking or multi-clicking (as determined by the browser), only the first click will trigger the ojAction event.
To ensure keyboard accessibility, the only correct, supported way to react to the click of a card is to listen for this event. Click listeners should not be used.
- Since:
- 9.1.0
Methods
-
getProperty(property) : {any}
-
Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description property
string 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 properties
Object 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 [property]Changed event.
Parameters:
Name Type Description property
string The property name to set. Supports dot notation for subproperty access. value
any The new value to set the property to. Returns:
- Type
- void