Element: <oj-action-card>

Oracle® JavaScript Extension Toolkit (JET)



class ojActionCard



JET Custom Elements

JET components are implemented as custom HTML elements. In addition to the component attributes documented in this page, JET components also support standard HTML global attributes like id and aria-label.

The JET data binding syntax can be used to define both component and global attributes through the use of dynamically evaluated expressions. All attributes (component and global) support attribute-level binding by prefixing the attribute name with ":" (e.g. :id="[...]"). When using attribute-level binding, all expression values are treated as strings. Additionally, component attributes support property-level binding by using the attribute name directly with no ":" prefix. When using property-level binding, the expressions should evaluate to the types documented by the corresponding attributes. Property-level binding is strongly recommended over attribute-level binding for component attributes.

A detailed description of working with custom HTML elements can be found in: JET Custom Element Usage.

  • 9.2.0
  • 9.1.0
  • ojactioncard

Module usage

See JET Module Loading for an overview of module usage within JET.

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";

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

JET Action

Description: Themeable, WAI-ARIA-compliant element that represents a card.

A JET Action Card provides a styled rectangular area with hover/focus/active state rendering, along with an ojAction event. It is used to enclosed a layout card component or or generic html. The action card is intended for consumption by waterfall containers.

<oj-action-card on-oj-action="[[actionHandler]]">
  Sample Text

As oj-action-card does not style the enclosed content, the application is responsible for ensuring that text colors used will satisfy the 3.1 contrast ratio between background color and text to comply with accessibility requirements.

Touch End User Information

Target Gesture Action
Action Card Tap Invoke the card's action.

Keyboard End User Information

Target Key Action
Action Card Enter or Space Invoke the card's action


For accessibility, a JET Button2 that doesn't have any text in its default slot (making it an icon-only button) should include an aria-label attribute that indicate its purpose.

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.


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.


The Default slot is the actions's body. It should not be explicitly named.


Displays the content in the central area of the action

   Default Card



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.

See Events and Listeners for additional information.

  • 9.1.0


getProperty(property) : {any}

Retrieves a value for a property or a single subproperty for complex properties.
Name Type Description
property string The property name to get. Supports dot notation for subproperty access.

setProperties(properties) : {void}

Performs a batch set of properties.
Name Type Description
properties Object An object containing the property and value pairs to set.

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.
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.