Element: <oj-c-action-card>

CORE PACK

Oracle® JavaScript Extension Toolkit (JET)
17.1.0

G12196-01

Since:
  • 16.0.0
Module:
  • action-card

QuickNav

Other Topics


JET Action

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

Action Card provides a styled rectangular area with hover/focus/active state rendering, along with an ojAction event.


<oj-c-action-card onAction="[[actionHandler]]">
  Sample Text
</oj-c-action-card>

As oj-c-action-card is intended to fire actions, it should not be used for the purpose of selection. That role is delegated to oj-c-selection-card.

Accessibility

A clarification in a11y rules states that any element with role of ActionCard should not have interactive elements inside: https://www.w3.org/TR/html-aria/#allowed-descendants-of-aria-roles


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.

Default

The default slot is the content of the card.

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
property 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 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
property The property name to set. Supports dot notation for subproperty access.
value The new value to set the property to.
Returns:
Type
void