This page is part of the MediaWiki Action API documentation.
MediaWiki version:
≥ 1.44
GET request to retrieve Codex icons, in JSON form, for use in user scripts.
This API is intended for user scripts. Gadgets and extensions do not need to use this API. They should instead bundle the icons directly in the module (see codexIcons option in gadget definition syntax ).
Full list of available icon names can be seen at https://mediawiki.org/w/resources/lib/codex-icons/codex-icons.json . This API module returns the same data as the JSON file, but allows selective retrieval of icons.
The following documentation is the output of Special: ApiHelp/ query+codexicons , automatically generated by the pre-release version of MediaWiki that is running on this site (MediaWiki.org).
Get Codex icons
Specific parameter:
names Names of icons
This parameter is required. Values (separate with | or alternative ): cdxIconAdd, cdxIconAlert, cdxIconAlignCenter, cdxIconAlignLeft, cdxIconAlignRight, cdxIconAppearance, cdxIconArrowDown, cdxIconArrowNext, cdxIconArrowPrevious, cdxIconArrowUp, cdxIconArticle, cdxIconArticleAdd, cdxIconArticleCheck, cdxIconArticleDisambiguation, cdxIconArticleNotFound, cdxIconArticleRedirect, cdxIconArticleSearch, cdxIconArticles, cdxIconArticlesSearch, cdxIconAttachment, cdxIconBell, cdxIconBellOutline, cdxIconBigger, cdxIconBlock, cdxIconBold, cdxIconBook, cdxIconBookmark, cdxIconBookmarkList, cdxIconBookmarkOutline, cdxIconBright, cdxIconBrowser, cdxIconCalendar, cdxIconCamera, cdxIconCancel, cdxIconChart, cdxIconCheck, cdxIconCheckAll, cdxIconClear, cdxIconClock, cdxIconClose, cdxIconCode, cdxIconCollapse, cdxIconConfigure, cdxIconCopy, cdxIconCut, cdxIconDatabase, cdxIconDie, cdxIconDoubleChevronEnd, cdxIconDoubleChevronStart, cdxIconDownTriangle, cdxIconDownload, cdxIconDraggable, cdxIconEdit, cdxIconEditLock, cdxIconEditUndo, cdxIconEllipsis, cdxIconError, cdxIconExitFullscreen, cdxIconExpand, cdxIconEye, cdxIconEyeClosed, cdxIconFeedback, cdxIconFlag, cdxIconFolderPlaceholder, cdxIconFullscreen, cdxIconFunction, cdxIconFunctionArgument, cdxIconFunnel, cdxIconGlobe, cdxIconHalfBright, cdxIconHalfStar, cdxIconHand, cdxIconHeart, cdxIconHelp, cdxIconHelpNotice, cdxIconHieroglyph, cdxIconHighlight, cdxIconHistory, cdxIconHome, cdxIconImage, cdxIconImageAdd, cdxIconImageBroken, cdxIconImageGallery, cdxIconImageLayoutBasic, cdxIconImageLayoutFrame, cdxIconImageLayoutFrameless, cdxIconImageLayoutThumbnail, cdxIconImageLock, cdxIconIndent, cdxIconInfo, cdxIconInfoFilled, cdxIconInstance, cdxIconItalic, cdxIconJournal, cdxIconKey, cdxIconKeyboard, cdxIconLabFlask, cdxIconLanguage, cdxIconLargerText, cdxIconLayout, cdxIconLightbulb, cdxIconLink, cdxIconLinkExternal, cdxIconLinkSecure, cdxIconListBullet, cdxIconListNumbered, cdxIconLiteral, cdxIconLock, cdxIconLogIn, cdxIconLogOut, cdxIconLogoCC, cdxIconLogoCodex, cdxIconLogoMediaWiki, cdxIconLogoMetaWiki, cdxIconLogoWikibooks, cdxIconLogoWikidata, cdxIconLogoWikifunctions, cdxIconLogoWikimedia, cdxIconLogoWikimediaCommons, cdxIconLogoWikimediaDiscovery, cdxIconLogoWikinews, cdxIconLogoWikipedia, cdxIconLogoWikiquote, cdxIconLogoWikisource, cdxIconLogoWikispecies, cdxIconLogoWikiversity, cdxIconLogoWikivoyage, cdxIconLogoWiktionary, cdxIconMap, cdxIconMapPin, cdxIconMapPinAdd, cdxIconMapTrail, cdxIconMarkup, cdxIconMathematics, cdxIconMathematicsDisplayBlock, cdxIconMathematicsDisplayDefault, cdxIconMathematicsDisplayInline, cdxIconMenu, cdxIconMerge, cdxIconMessage, cdxIconMoon, cdxIconMove, cdxIconMoveFirst, cdxIconMoveLast, cdxIconMusicalScore, cdxIconNetwork, cdxIconNetworkOff, cdxIconNewWindow, cdxIconNewline, cdxIconNewspaper, cdxIconNext, cdxIconNoWikitext, cdxIconNotBright, cdxIconNotice, cdxIconOngoingConversation, cdxIconOutdent, cdxIconOutline, cdxIconPageSettings, cdxIconPalette, cdxIconPaste, cdxIconPause, cdxIconPlay, cdxIconPower, cdxIconPrevious, cdxIconPrinter, cdxIconPushPin, cdxIconPuzzle, cdxIconQrCode, cdxIconQuotes, cdxIconRecentChanges, cdxIconRedo, cdxIconReference, cdxIconReferenceExisting, cdxIconReferences, cdxIconReload, cdxIconRestore, cdxIconRobot, cdxIconSandbox, cdxIconSearch, cdxIconSearchCaseSensitive, cdxIconSearchDiacritics, cdxIconSearchRegularExpression, cdxIconSettings, cdxIconShare, cdxIconSignature, cdxIconSmaller, cdxIconSmallerText, cdxIconSortVertical, cdxIconSpecialCharacter, cdxIconSpecialPages, cdxIconSpeechBubble, cdxIconSpeechBubbleAdd, cdxIconSpeechBubbles, cdxIconStar, cdxIconStop, cdxIconStrikethrough, cdxIconSubscript, cdxIconSubtract, cdxIconSuccess, cdxIconSuperscript, cdxIconTable, cdxIconTableAddColumnAfter, cdxIconTableAddColumnBefore, cdxIconTableAddRowAfter, cdxIconTableAddRowBefore, cdxIconTableCaption, cdxIconTableMergeCells, cdxIconTableMoveColumnAfter, cdxIconTableMoveColumnBefore, cdxIconTableMoveRowAfter, cdxIconTableMoveRowBefore, cdxIconTag, cdxIconTemplateAdd, cdxIconTextDirLTR, cdxIconTextDirRTL, cdxIconTextFlow, cdxIconTextStyle, cdxIconTextSummary, cdxIconTrash, cdxIconTray, cdxIconUnBlock, cdxIconUnFlag, cdxIconUnLink, cdxIconUnLock, cdxIconUnStar, cdxIconUnderline, cdxIconUndo, cdxIconUpTriangle, cdxIconUpdate, cdxIconUpload, cdxIconUserActive, cdxIconUserAdd, cdxIconUserAnonymous, cdxIconUserAvatar, cdxIconUserAvatarOutline, cdxIconUserBlocked, cdxIconUserContributions, cdxIconUserGroup, cdxIconUserRights, cdxIconUserTalk, cdxIconUserTemporary, cdxIconUserTemporaryLocation, cdxIconViewCompact, cdxIconViewDetails, cdxIconVisionSimulator, cdxIconVolumeDown, cdxIconVolumeOff, cdxIconVolumeUp, cdxIconWatchlist, cdxIconWikitext, cdxIconWindow, cdxIconZoomIn, cdxIconZoomOut Maximum number of values is 50 (500 for clients that are allowed higher limits). To specify all values, use * .
A Vue.js gadget needs to be included in a packaged gadget .
< template >
< cdx-icon
v-if = " iconInfo "
: icon = " iconInfo "
/>
</ template >
< script >
const { ref , onMounted } = require ( 'vue' );
const { CdxIcon } = require ( '@wikimedia/codex' );
module . exports = {
name : 'IconInfo' ,
components : { CdxIcon },
setup () {
const iconInfo = ref ( '' );
onMounted ( async () => {
await mw . loader . using ( 'mediawiki.api' );
const api = new mw . Api ( {
userAgent : 'MyScript/1.0.0 (MyTalkPage)'
} );
const params = {
action : 'query' ,
list : 'codexicons' ,
names : [ 'cdxIconInfo' ],
};
const data = await api . get ( params );
iconInfo . value = data . query . codexicons . cdxIconInfo ;
} );
return {
iconInfo
};
}
};
</ script >