UI

Quick actions

The few things a reader does most, one press away, each named in words.

Read Markdown

Web 0.2.0

Quick actions

  • Defaultlight16.95 : 1AA 4.5dark16.95 : 1AA 4.5
  • KeyboardTabEnterSpaceShift+Tab
  • measured on 0.2.0
npx shadcn@latest add @maeso/quick-actions
Size
17.7 kB gzipmeasured on 0.2.0

Usage

Offer a small set of frequent actions with clear labels. Keep unavailable actions explained or absent.

Accessibility

Make every action keyboard reachable and distinctly named. Icons must not replace accessible labels.

When to use

Use for common shortcuts within the current task. Keep a complete navigation path available elsewhere.

Install

Add this registry to your project's components.json once, before the first install. Keep your existing settings and other registries.

{
  "registries": {
    "@maeso": "http://127.0.0.1:4321/r/{name}.json"
  }
}

Then install the registry's default theme once, and import its sheet in the CSS entry that imports Tailwind. It paints every item from this registry.

npx shadcn@latest add @maeso/maeso
@import "./styles/theme.web.css";
npx shadcn@latest add @maeso/quick-actions

Props

QuickActions

PropTypeRequiredDescription
actionsreadonly QuickAction[] | undefinedno
styleCSSProperties | undefinedno
titlestring | undefinedno
Also accepts every HTMLElement attribute276 props
PropTypeRequiredDescription
aboutstring | undefinedno
accessKeystring | undefinedno
aria-activedescendantstring | undefinednoIdentifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-atomicBooleanish | undefinednoIndicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
aria-autocomplete"both" | "inline" | "list" | "none" | undefinednoIndicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
aria-braillelabelstring | undefinednoDefines a string value that labels the current element, which is intended to be converted into Braille.
aria-brailleroledescriptionstring | undefinednoDefines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
aria-busyBooleanish | undefinedno
aria-checked"false" | "mixed" | "true" | boolean | undefinednoIndicates the current "checked" state of checkboxes, radio buttons, and other widgets.
aria-colcountnumber | undefinednoDefines the total number of columns in a table, grid, or treegrid.
aria-colindexnumber | undefinednoDefines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
aria-colindextextstring | undefinednoDefines a human readable text alternative of aria-colindex.
aria-colspannumber | undefinednoDefines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
aria-controlsstring | undefinednoIdentifies the element (or elements) whose contents or presence are controlled by the current element.
aria-current"date" | "false" | "location" | "page" | "step" | "time" | "true" | boolean | undefinednoIndicates the element that represents the current item within a container or set of related elements.
aria-describedbystring | undefinednoIdentifies the element (or elements) that describes the object.
aria-descriptionstring | undefinednoDefines a string value that describes or annotates the current element.
aria-detailsstring | undefinednoIdentifies the element that provides a detailed, extended description for the object.
aria-disabledBooleanish | undefinednoIndicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
aria-dropeffect"copy" | "execute" | "link" | "move" | "none" | "popup" | undefinednoIndicates what functions can be performed when a dragged object is released on the drop target.
aria-errormessagestring | undefinednoIdentifies the element that provides an error message for the object.
aria-expandedBooleanish | undefinednoIndicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
aria-flowtostring | undefinednoIdentifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
aria-grabbedBooleanish | undefinednoIndicates an element's "grabbed" state in a drag-and-drop operation.
aria-haspopup"dialog" | "false" | "grid" | "listbox" | "menu" | "tree" | "true" | boolean | undefinednoIndicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
aria-hiddenBooleanish | undefinednoIndicates whether the element is exposed to an accessibility API.
aria-invalid"false" | "grammar" | "spelling" | "true" | boolean | undefinednoIndicates the entered value does not conform to the format expected by the application.
aria-keyshortcutsstring | undefinednoIndicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
aria-labelstring | undefinednoDefines a string value that labels the current element.
aria-labelledbystring | undefinednoIdentifies the element (or elements) that labels the current element.
aria-levelnumber | undefinednoDefines the hierarchical level of an element within a structure.
aria-live"assertive" | "off" | "polite" | undefinednoIndicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
aria-modalBooleanish | undefinednoIndicates whether an element is modal when displayed.
aria-multilineBooleanish | undefinednoIndicates whether a text box accepts multiple lines of input or only a single line.
aria-multiselectableBooleanish | undefinednoIndicates that the user may select more than one item from the current selectable descendants.
aria-orientation"horizontal" | "vertical" | undefinednoIndicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
aria-ownsstring | undefinednoIdentifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
aria-placeholderstring | undefinednoDefines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
aria-posinsetnumber | undefinednoDefines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
aria-pressed"false" | "mixed" | "true" | boolean | undefinednoIndicates the current "pressed" state of toggle buttons.
aria-readonlyBooleanish | undefinednoIndicates that the element is not editable, but is otherwise operable.
aria-relevant"additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefinednoIndicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
aria-requiredBooleanish | undefinednoIndicates that user input is required on the element before a form may be submitted.
aria-roledescriptionstring | undefinednoDefines a human-readable, author-localized description for the role of an element.
aria-rowcountnumber | undefinednoDefines the total number of rows in a table, grid, or treegrid.
aria-rowindexnumber | undefinednoDefines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
aria-rowindextextstring | undefinednoDefines a human readable text alternative of aria-rowindex.
aria-rowspannumber | undefinednoDefines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
aria-selectedBooleanish | undefinednoIndicates the current "selected" state of various widgets.
aria-setsizenumber | undefinednoDefines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
aria-sort"ascending" | "descending" | "none" | "other" | undefinednoIndicates if items in a table or grid are sorted in ascending or descending order.
aria-valuemaxnumber | undefinednoDefines the maximum allowed value for a range widget.
aria-valueminnumber | undefinednoDefines the minimum allowed value for a range widget.
aria-valuenownumber | undefinednoDefines the current value for a range widget.
aria-valuetextstring | undefinednoDefines the human readable text alternative of aria-valuenow for a range widget.
autoCapitalize"characters" | "none" | "off" | "on" | "sentences" | "words" | (string & {}) | undefinedno
autoCorrectstring | undefinedno
autoFocusboolean | undefinedno
autoSavestring | undefinedno
childrenReactNodeno
classNamestring | undefinedno
colorstring | undefinedno
contentstring | undefinedno
contentEditable"inherit" | "plaintext-only" | Booleanish | undefinedno
contextMenustring | undefinedno
dangerouslySetInnerHTML{ __html: string | TrustedHTML; } | undefinedno
datatypestring | undefinedno
defaultCheckedboolean | undefinedno
defaultValuestring | number | readonly string[] | undefinedno
dirstring | undefinedno
draggableBooleanish | undefinedno
enterKeyHint"done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefinedno
exportpartsstring | undefinedno
hiddenboolean | undefinedno
idstring | undefinedno
inertboolean | undefinedno
inlistanyno
inputMode"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url" | undefinednoHints at the type of data that might be entered by the user while editing the element or its contents
isstring | undefinednoSpecify that a standard HTML element should behave like a defined custom built-in element
itemIDstring | undefinedno
itemPropstring | undefinedno
itemRefstring | undefinedno
itemScopeboolean | undefinedno
itemTypestring | undefinedno
langstring | undefinedno
noncestring | undefinedno
onAbortReactEventHandler<HTMLElement> | undefinedno
onAbortCaptureReactEventHandler<HTMLElement> | undefinedno
onAnimationEndAnimationEventHandler<HTMLElement> | undefinedno
onAnimationEndCaptureAnimationEventHandler<HTMLElement> | undefinedno
onAnimationIterationAnimationEventHandler<HTMLElement> | undefinedno
onAnimationIterationCaptureAnimationEventHandler<HTMLElement> | undefinedno
onAnimationStartAnimationEventHandler<HTMLElement> | undefinedno
onAnimationStartCaptureAnimationEventHandler<HTMLElement> | undefinedno
onAuxClickMouseEventHandler<HTMLElement> | undefinedno
onAuxClickCaptureMouseEventHandler<HTMLElement> | undefinedno
onBeforeInputInputEventHandler<HTMLElement> | undefinedno
onBeforeInputCaptureInputEventHandler<HTMLElement> | undefinedno
onBeforeToggleToggleEventHandler<HTMLElement> | undefinedno
onBlurFocusEventHandler<HTMLElement> | undefinedno
onBlurCaptureFocusEventHandler<HTMLElement> | undefinedno
onCanPlayReactEventHandler<HTMLElement> | undefinedno
onCanPlayCaptureReactEventHandler<HTMLElement> | undefinedno
onCanPlayThroughReactEventHandler<HTMLElement> | undefinedno
onCanPlayThroughCaptureReactEventHandler<HTMLElement> | undefinedno
onChangeChangeEventHandler<HTMLElement, Element> | undefinedno
onChangeCaptureChangeEventHandler<HTMLElement, Element> | undefinedno
onClickMouseEventHandler<HTMLElement> | undefinedno
onClickCaptureMouseEventHandler<HTMLElement> | undefinedno
onCompositionEndCompositionEventHandler<HTMLElement> | undefinedno
onCompositionEndCaptureCompositionEventHandler<HTMLElement> | undefinedno
onCompositionStartCompositionEventHandler<HTMLElement> | undefinedno
onCompositionStartCaptureCompositionEventHandler<HTMLElement> | undefinedno
onCompositionUpdateCompositionEventHandler<HTMLElement> | undefinedno
onCompositionUpdateCaptureCompositionEventHandler<HTMLElement> | undefinedno
onContextMenuMouseEventHandler<HTMLElement> | undefinedno
onContextMenuCaptureMouseEventHandler<HTMLElement> | undefinedno
onCopyClipboardEventHandler<HTMLElement> | undefinedno
onCopyCaptureClipboardEventHandler<HTMLElement> | undefinedno
onCutClipboardEventHandler<HTMLElement> | undefinedno
onCutCaptureClipboardEventHandler<HTMLElement> | undefinedno
onDoubleClickMouseEventHandler<HTMLElement> | undefinedno
onDoubleClickCaptureMouseEventHandler<HTMLElement> | undefinedno
onDragDragEventHandler<HTMLElement> | undefinedno
onDragCaptureDragEventHandler<HTMLElement> | undefinedno
onDragEndDragEventHandler<HTMLElement> | undefinedno
onDragEndCaptureDragEventHandler<HTMLElement> | undefinedno
onDragEnterDragEventHandler<HTMLElement> | undefinedno
onDragEnterCaptureDragEventHandler<HTMLElement> | undefinedno
onDragExitDragEventHandler<HTMLElement> | undefinedno
onDragExitCaptureDragEventHandler<HTMLElement> | undefinedno
onDragLeaveDragEventHandler<HTMLElement> | undefinedno
onDragLeaveCaptureDragEventHandler<HTMLElement> | undefinedno
onDragOverDragEventHandler<HTMLElement> | undefinedno
onDragOverCaptureDragEventHandler<HTMLElement> | undefinedno
onDragStartDragEventHandler<HTMLElement> | undefinedno
onDragStartCaptureDragEventHandler<HTMLElement> | undefinedno
onDropDragEventHandler<HTMLElement> | undefinedno
onDropCaptureDragEventHandler<HTMLElement> | undefinedno
onDurationChangeReactEventHandler<HTMLElement> | undefinedno
onDurationChangeCaptureReactEventHandler<HTMLElement> | undefinedno
onEmptiedReactEventHandler<HTMLElement> | undefinedno
onEmptiedCaptureReactEventHandler<HTMLElement> | undefinedno
onEncryptedReactEventHandler<HTMLElement> | undefinedno
onEncryptedCaptureReactEventHandler<HTMLElement> | undefinedno
onEndedReactEventHandler<HTMLElement> | undefinedno
onEndedCaptureReactEventHandler<HTMLElement> | undefinedno
onErrorReactEventHandler<HTMLElement> | undefinedno
onErrorCaptureReactEventHandler<HTMLElement> | undefinedno
onFocusFocusEventHandler<HTMLElement> | undefinedno
onFocusCaptureFocusEventHandler<HTMLElement> | undefinedno
onGotPointerCapturePointerEventHandler<HTMLElement> | undefinedno
onGotPointerCaptureCapturePointerEventHandler<HTMLElement> | undefinedno
onInputInputEventHandler<HTMLElement> | undefinedno
onInputCaptureInputEventHandler<HTMLElement> | undefinedno
onInvalidReactEventHandler<HTMLElement> | undefinedno
onInvalidCaptureReactEventHandler<HTMLElement> | undefinedno
onKeyDownKeyboardEventHandler<HTMLElement> | undefinedno
onKeyDownCaptureKeyboardEventHandler<HTMLElement> | undefinedno
onKeyPressKeyboardEventHandler<HTMLElement> | undefinedno
onKeyPressCaptureKeyboardEventHandler<HTMLElement> | undefinedno
onKeyUpKeyboardEventHandler<HTMLElement> | undefinedno
onKeyUpCaptureKeyboardEventHandler<HTMLElement> | undefinedno
onLoadReactEventHandler<HTMLElement> | undefinedno
onLoadCaptureReactEventHandler<HTMLElement> | undefinedno
onLoadedDataReactEventHandler<HTMLElement> | undefinedno
onLoadedDataCaptureReactEventHandler<HTMLElement> | undefinedno
onLoadedMetadataReactEventHandler<HTMLElement> | undefinedno
onLoadedMetadataCaptureReactEventHandler<HTMLElement> | undefinedno
onLoadStartReactEventHandler<HTMLElement> | undefinedno
onLoadStartCaptureReactEventHandler<HTMLElement> | undefinedno
onLostPointerCapturePointerEventHandler<HTMLElement> | undefinedno
onLostPointerCaptureCapturePointerEventHandler<HTMLElement> | undefinedno
onMouseDownMouseEventHandler<HTMLElement> | undefinedno
onMouseDownCaptureMouseEventHandler<HTMLElement> | undefinedno
onMouseEnterMouseEventHandler<HTMLElement> | undefinedno
onMouseLeaveMouseEventHandler<HTMLElement> | undefinedno
onMouseMoveMouseEventHandler<HTMLElement> | undefinedno
onMouseMoveCaptureMouseEventHandler<HTMLElement> | undefinedno
onMouseOutMouseEventHandler<HTMLElement> | undefinedno
onMouseOutCaptureMouseEventHandler<HTMLElement> | undefinedno
onMouseOverMouseEventHandler<HTMLElement> | undefinedno
onMouseOverCaptureMouseEventHandler<HTMLElement> | undefinedno
onMouseUpMouseEventHandler<HTMLElement> | undefinedno
onMouseUpCaptureMouseEventHandler<HTMLElement> | undefinedno
onPasteClipboardEventHandler<HTMLElement> | undefinedno
onPasteCaptureClipboardEventHandler<HTMLElement> | undefinedno
onPauseReactEventHandler<HTMLElement> | undefinedno
onPauseCaptureReactEventHandler<HTMLElement> | undefinedno
onPlayReactEventHandler<HTMLElement> | undefinedno
onPlayCaptureReactEventHandler<HTMLElement> | undefinedno
onPlayingReactEventHandler<HTMLElement> | undefinedno
onPlayingCaptureReactEventHandler<HTMLElement> | undefinedno
onPointerCancelPointerEventHandler<HTMLElement> | undefinedno
onPointerCancelCapturePointerEventHandler<HTMLElement> | undefinedno
onPointerDownPointerEventHandler<HTMLElement> | undefinedno
onPointerDownCapturePointerEventHandler<HTMLElement> | undefinedno
onPointerEnterPointerEventHandler<HTMLElement> | undefinedno
onPointerLeavePointerEventHandler<HTMLElement> | undefinedno
onPointerMovePointerEventHandler<HTMLElement> | undefinedno
onPointerMoveCapturePointerEventHandler<HTMLElement> | undefinedno
onPointerOutPointerEventHandler<HTMLElement> | undefinedno
onPointerOutCapturePointerEventHandler<HTMLElement> | undefinedno
onPointerOverPointerEventHandler<HTMLElement> | undefinedno
onPointerOverCapturePointerEventHandler<HTMLElement> | undefinedno
onPointerUpPointerEventHandler<HTMLElement> | undefinedno
onPointerUpCapturePointerEventHandler<HTMLElement> | undefinedno
onProgressReactEventHandler<HTMLElement> | undefinedno
onProgressCaptureReactEventHandler<HTMLElement> | undefinedno
onRateChangeReactEventHandler<HTMLElement> | undefinedno
onRateChangeCaptureReactEventHandler<HTMLElement> | undefinedno
onResetReactEventHandler<HTMLElement> | undefinedno
onResetCaptureReactEventHandler<HTMLElement> | undefinedno
onScrollUIEventHandler<HTMLElement> | undefinedno
onScrollCaptureUIEventHandler<HTMLElement> | undefinedno
onScrollEndUIEventHandler<HTMLElement> | undefinedno
onScrollEndCaptureUIEventHandler<HTMLElement> | undefinedno
onSeekedReactEventHandler<HTMLElement> | undefinedno
onSeekedCaptureReactEventHandler<HTMLElement> | undefinedno
onSeekingReactEventHandler<HTMLElement> | undefinedno
onSeekingCaptureReactEventHandler<HTMLElement> | undefinedno
onSelectReactEventHandler<HTMLElement> | undefinedno
onSelectCaptureReactEventHandler<HTMLElement> | undefinedno
onStalledReactEventHandler<HTMLElement> | undefinedno
onStalledCaptureReactEventHandler<HTMLElement> | undefinedno
onSubmitSubmitEventHandler<HTMLElement> | undefinedno
onSubmitCaptureSubmitEventHandler<HTMLElement> | undefinedno
onSuspendReactEventHandler<HTMLElement> | undefinedno
onSuspendCaptureReactEventHandler<HTMLElement> | undefinedno
onTimeUpdateReactEventHandler<HTMLElement> | undefinedno
onTimeUpdateCaptureReactEventHandler<HTMLElement> | undefinedno
onToggleToggleEventHandler<HTMLElement> | undefinedno
onTouchCancelTouchEventHandler<HTMLElement> | undefinedno
onTouchCancelCaptureTouchEventHandler<HTMLElement> | undefinedno
onTouchEndTouchEventHandler<HTMLElement> | undefinedno
onTouchEndCaptureTouchEventHandler<HTMLElement> | undefinedno
onTouchMoveTouchEventHandler<HTMLElement> | undefinedno
onTouchMoveCaptureTouchEventHandler<HTMLElement> | undefinedno
onTouchStartTouchEventHandler<HTMLElement> | undefinedno
onTouchStartCaptureTouchEventHandler<HTMLElement> | undefinedno
onTransitionCancelTransitionEventHandler<HTMLElement> | undefinedno
onTransitionCancelCaptureTransitionEventHandler<HTMLElement> | undefinedno
onTransitionEndTransitionEventHandler<HTMLElement> | undefinedno
onTransitionEndCaptureTransitionEventHandler<HTMLElement> | undefinedno
onTransitionRunTransitionEventHandler<HTMLElement> | undefinedno
onTransitionRunCaptureTransitionEventHandler<HTMLElement> | undefinedno
onTransitionStartTransitionEventHandler<HTMLElement> | undefinedno
onTransitionStartCaptureTransitionEventHandler<HTMLElement> | undefinedno
onVolumeChangeReactEventHandler<HTMLElement> | undefinedno
onVolumeChangeCaptureReactEventHandler<HTMLElement> | undefinedno
onWaitingReactEventHandler<HTMLElement> | undefinedno
onWaitingCaptureReactEventHandler<HTMLElement> | undefinedno
onWheelWheelEventHandler<HTMLElement> | undefinedno
onWheelCaptureWheelEventHandler<HTMLElement> | undefinedno
partstring | undefinedno
popover"" | "auto" | "hint" | "manual" | undefinedno
popoverTargetstring | undefinedno
popoverTargetAction"hide" | "show" | "toggle" | undefinedno
prefixstring | undefinedno
propertystring | undefinedno
radioGroupstring | undefinedno
relstring | undefinedno
resourcestring | undefinedno
resultsnumber | undefinedno
revstring | undefinedno
roleAriaRole | undefinedno
securitystring | undefinedno
slotstring | undefinedno
spellCheckBooleanish | undefinedno
suppressContentEditableWarningboolean | undefinedno
suppressHydrationWarningboolean | undefinedno
tabIndexnumber | undefinedno
translate"no" | "yes" | undefinedno
typeofstring | undefinedno
unselectable"off" | "on" | undefinedno
vocabstring | undefinedno

Proof

Contrast

measured on 0.2.0

StateForegroundBackgroundRatioFloor
defaultrgb(7 21 34)rgb(248 245 240)16.95AA 4.5
default (dark)rgb(248 245 240)rgb(7 21 34)16.95AA 4.5

Keyboard

measured on 0.2.0

KeyAction
TabTraverse every enabled control in caller reading order and exit
EnterActivate Create draft: draft-created
SpaceActivate Create draft: draft-created
EnterActivate Review draft: draft-reviewed
SpaceActivate Review draft: draft-reviewed
Shift+TabReturn through every enabled control and exit to the entry sentinel

Size

17715 gzip bytes · measured on 0.2.0

Motion

The action colors change; reduced motion leaves no movement or opacity animation; color feedback stays.

Configured duration: 100 ms

Reduced motion: none

Motion timing

Observed duration: 100 ms · measured on 0.2.0

Reduced motion

passed · measured on 0.2.0

Example

import { QuickActions } from "@/components/ui/_kit/blocks/quick-actions/QuickActions";

const Example = () => (
		<div className="w-full max-w-105">
			<QuickActions
				actions={[
					{ id: "new", label: "New project", icon: "file-plus" },
					{ id: "invite", label: "Invite teammate", icon: "user-round" },
					{ id: "settings", label: "Open settings", icon: "settings" },
				]}
			/>
		</div>
	);
export default Example;

not on native yet