Skip to content

Actions

Overview

The utils.actions.js module exports actionProps, a reusable Vue props definition object shared by all KDK action components (buttons, FAB actions, tabs, items, etc.).

actionProps

A Vue props definition object to be spread into a component's props option:

javascript
import { actionProps } from '@kalisio/kdk/core.client'

export default {
  props: { ...actionProps }
}

Props

PropTypeDefaultDescription
idString(required)Unique identifier for the action.
labelStringnullDisplay label.
iconStringundefinedIcon class or name.
iconRightBooleanfalseWhen true, the icon is placed to the right of the label.
colorString'grey-9'Quasar color name.
sizeString'md'Size token ('xs', 'sm', 'md', 'lg', 'xl').
flatBooleantrueRenders as a flat (no background) button.
outlineBooleanfalseRenders with an outline border.
badgeObjectnullBadge configuration object passed to Quasar QBadge.
tooltipString''Tooltip text shown on hover.
disabledBoolean | FunctionfalseDisables the action. Can be a function returning a boolean.
toggledBooleanfalseWhether the action is in a toggled/active state.
toggleObject{}Toggle appearance configuration (e.g. { icon, color }).
stackBooleanfalseStacks icon above label.
loadingBooleanfalseShows a loading spinner.
propagateBooleantrueWhether click events propagate to parent elements.
contextObjectnullArbitrary context object passed to the handler.
handlerFunctionnullClick handler function.
closePopupBoolean | Number | StringfalseCloses a parent popup on click. A number specifies how many levels to close.
dialogObjectnullQuasar dialog configuration to open on click.
routeObjectnullVue Router route to navigate to on click.
urlStringnullURL to open in a new tab on click.
rendererString'button'How the action is rendered. One of 'button', 'form-button', 'item', 'fab', 'fab-action', 'tab'.