Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@govuk-react/caption

Package Overview
Dependencies
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/caption

Renders children passed inside a styled span element.

  • 0.10.4
  • npm
  • Socket score

Version published
Weekly downloads
5.1K
decreased by-13.32%
Maintainers
5
Weekly downloads
 
Created
Source

Caption

Import

  import Caption from '@govuk-react/caption';

Sometimes you may need to make it clear that a page is part of a larger section or group. To do this, you can use a heading with a caption above it.

  • https://govuk-react.github.io/govuk-react/?path=/docs/caption
  • https://design-system.service.gov.uk/styles/typography/#headings

Properties

PropRequiredDefaultTypeDescription
aboutstring
accessKeystring
aria-activedescendantstringIdentifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-atomicboolean | "true" | "false"Indicates 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"list" | "none" | "inline" | "both"Indicates 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-busyboolean | "true" | "false"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
aria-checkedboolean | "true" | "false" | "mixed"Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
@see aria-pressed
@see aria-selected.
aria-colcountnumberDefines the total number of columns in a table, grid, or treegrid.
@see aria-colindex.
aria-colindexnumberDefines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
@see aria-colcount
@see aria-colspan.
aria-colspannumberDefines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
@see aria-colindex
@see aria-rowspan.
aria-controlsstringIdentifies the element (or elements) whose contents or presence are controlled by the current element.
@see aria-owns.
aria-currentboolean | "time" | "true" | "false" | "page" | "step" | "location" | "date"Indicates the element that represents the current item within a container or set of related elements.
aria-describedbystringIdentifies the element (or elements) that describes the object.
@see aria-labelledby
aria-detailsstringIdentifies the element that provides a detailed, extended description for the object.
@see aria-describedby.
aria-disabledboolean | "true" | "false"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
@see aria-hidden
@see aria-readonly.
aria-dropeffect"link" | "none" | "copy" | "execute" | "move" | "popup"Indicates what functions can be performed when a dragged object is released on the drop target.
@deprecated in ARIA 1.1
aria-errormessagestringIdentifies the element that provides an error message for the object.
@see aria-invalid
@see aria-describedby.
aria-expandedboolean | "true" | "false"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
aria-flowtostringIdentifies 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-grabbedboolean | "true" | "false"Indicates an element's "grabbed" state in a drag-and-drop operation.
@deprecated in ARIA 1.1
aria-haspopupboolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
aria-hiddenboolean | "true" | "false"Indicates whether the element is exposed to an accessibility API.
@see aria-disabled.
aria-invalidboolean | "true" | "false" | "grammar" | "spelling"Indicates the entered value does not conform to the format expected by the application.
@see aria-errormessage.
aria-keyshortcutsstringIndicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
aria-labelstringDefines a string value that labels the current element.
@see aria-labelledby.
aria-labelledbystringIdentifies the element (or elements) that labels the current element.
@see aria-describedby.
aria-levelnumberDefines the hierarchical level of an element within a structure.
aria-live"off" | "assertive" | "polite"Indicates 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-modalboolean | "true" | "false"Indicates whether an element is modal when displayed.
aria-multilineboolean | "true" | "false"Indicates whether a text box accepts multiple lines of input or only a single line.
aria-multiselectableboolean | "true" | "false"Indicates that the user may select more than one item from the current selectable descendants.
aria-orientation"horizontal" | "vertical"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
aria-ownsstringIdentifies 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.
@see aria-controls.
aria-placeholderstringDefines 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-posinsetnumberDefines 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.
@see aria-setsize.
aria-pressedboolean | "true" | "false" | "mixed"Indicates the current "pressed" state of toggle buttons.
@see aria-checked
@see aria-selected.
aria-readonlyboolean | "true" | "false"Indicates that the element is not editable, but is otherwise operable.
@see aria-disabled.
aria-relevant"text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
@see aria-atomic.
aria-requiredboolean | "true" | "false"Indicates that user input is required on the element before a form may be submitted.
aria-roledescriptionstringDefines a human-readable, author-localized description for the role of an element.
aria-rowcountnumberDefines the total number of rows in a table, grid, or treegrid.
@see aria-rowindex.
aria-rowindexnumberDefines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
@see aria-rowcount
@see aria-rowspan.
aria-rowspannumberDefines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
@see aria-rowindex
@see aria-colspan.
aria-selectedboolean | "true" | "false"Indicates the current "selected" state of various widgets.
@see aria-checked
@see aria-pressed.
aria-setsizenumberDefines 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.
@see aria-posinset.
aria-sort"none" | "ascending" | "descending" | "other"Indicates if items in a table or grid are sorted in ascending or descending order.
aria-valuemaxnumberDefines the maximum allowed value for a range widget.
aria-valueminnumberDefines the minimum allowed value for a range widget.
aria-valuenownumberDefines the current value for a range widget.
@see aria-valuetext.
aria-valuetextstringDefines the human readable text alternative of aria-valuenow for a range widget.
asundefined
autoCapitalizestring
autoCorrectstring
autoSavestring
classNamestring
colorstring
contentEditableBooleanish | "inherit"
contextMenustring
dangerouslySetInnerHTML{ __html: string; }
datatypestring
defaultCheckedboolean
defaultValuestring | number | readonly string[]
dirstring
draggableBooleanish
forwardedAsundefined
hiddenboolean
idstring
inlistany
inputMode"text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal"Hints at the type of data that might be entered by the user while editing the element or its contents
@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
isstringSpecify that a standard HTML element should behave like a defined custom built-in element
@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
keyKey
langstring
marginMargin | Margin[]
mbstring | number
onAbortReactEventHandler
onAbortCaptureReactEventHandler
onAnimationEndAnimationEventHandler
onAnimationEndCaptureAnimationEventHandler
onAnimationIterationAnimationEventHandler
onAnimationIterationCaptureAnimationEventHandler
onAnimationStartAnimationEventHandler
onAnimationStartCaptureAnimationEventHandler
onAuxClickMouseEventHandler
onAuxClickCaptureMouseEventHandler
onBeforeInputFormEventHandler
onBeforeInputCaptureFormEventHandler
onBlurFocusEventHandler
onBlurCaptureFocusEventHandler
onCanPlayReactEventHandler
onCanPlayCaptureReactEventHandler
onCanPlayThroughReactEventHandler
onCanPlayThroughCaptureReactEventHandler
onChangeFormEventHandler
onChangeCaptureFormEventHandler
onClickMouseEventHandler
onClickCaptureMouseEventHandler
onCompositionEndCompositionEventHandler
onCompositionEndCaptureCompositionEventHandler
onCompositionStartCompositionEventHandler
onCompositionStartCaptureCompositionEventHandler
onCompositionUpdateCompositionEventHandler
onCompositionUpdateCaptureCompositionEventHandler
onContextMenuMouseEventHandler
onContextMenuCaptureMouseEventHandler
onCopyClipboardEventHandler
onCopyCaptureClipboardEventHandler
onCutClipboardEventHandler
onCutCaptureClipboardEventHandler
onDoubleClickMouseEventHandler
onDoubleClickCaptureMouseEventHandler
onDragDragEventHandler
onDragCaptureDragEventHandler
onDragEndDragEventHandler
onDragEndCaptureDragEventHandler
onDragEnterDragEventHandler
onDragEnterCaptureDragEventHandler
onDragExitDragEventHandler
onDragExitCaptureDragEventHandler
onDragLeaveDragEventHandler
onDragLeaveCaptureDragEventHandler
onDragOverDragEventHandler
onDragOverCaptureDragEventHandler
onDragStartDragEventHandler
onDragStartCaptureDragEventHandler
onDropDragEventHandler
onDropCaptureDragEventHandler
onDurationChangeReactEventHandler
onDurationChangeCaptureReactEventHandler
onEmptiedReactEventHandler
onEmptiedCaptureReactEventHandler
onEncryptedReactEventHandler
onEncryptedCaptureReactEventHandler
onEndedReactEventHandler
onEndedCaptureReactEventHandler
onErrorReactEventHandler
onErrorCaptureReactEventHandler
onFocusFocusEventHandler
onFocusCaptureFocusEventHandler
onGotPointerCapturePointerEventHandler
onGotPointerCaptureCapturePointerEventHandler
onInputFormEventHandler
onInputCaptureFormEventHandler
onInvalidFormEventHandler
onInvalidCaptureFormEventHandler
onKeyDownKeyboardEventHandler
onKeyDownCaptureKeyboardEventHandler
onKeyPressKeyboardEventHandler
onKeyPressCaptureKeyboardEventHandler
onKeyUpKeyboardEventHandler
onKeyUpCaptureKeyboardEventHandler
onLoadReactEventHandler
onLoadCaptureReactEventHandler
onLoadStartReactEventHandler
onLoadStartCaptureReactEventHandler
onLoadedDataReactEventHandler
onLoadedDataCaptureReactEventHandler
onLoadedMetadataReactEventHandler
onLoadedMetadataCaptureReactEventHandler
onLostPointerCapturePointerEventHandler
onLostPointerCaptureCapturePointerEventHandler
onMouseDownMouseEventHandler
onMouseDownCaptureMouseEventHandler
onMouseEnterMouseEventHandler
onMouseLeaveMouseEventHandler
onMouseMoveMouseEventHandler
onMouseMoveCaptureMouseEventHandler
onMouseOutMouseEventHandler
onMouseOutCaptureMouseEventHandler
onMouseOverMouseEventHandler
onMouseOverCaptureMouseEventHandler
onMouseUpMouseEventHandler
onMouseUpCaptureMouseEventHandler
onPasteClipboardEventHandler
onPasteCaptureClipboardEventHandler
onPauseReactEventHandler
onPauseCaptureReactEventHandler
onPlayReactEventHandler
onPlayCaptureReactEventHandler
onPlayingReactEventHandler
onPlayingCaptureReactEventHandler
onPointerCancelPointerEventHandler
onPointerCancelCapturePointerEventHandler
onPointerDownPointerEventHandler
onPointerDownCapturePointerEventHandler
onPointerEnterPointerEventHandler
onPointerEnterCapturePointerEventHandler
onPointerLeavePointerEventHandler
onPointerLeaveCapturePointerEventHandler
onPointerMovePointerEventHandler
onPointerMoveCapturePointerEventHandler
onPointerOutPointerEventHandler
onPointerOutCapturePointerEventHandler
onPointerOverPointerEventHandler
onPointerOverCapturePointerEventHandler
onPointerUpPointerEventHandler
onPointerUpCapturePointerEventHandler
onProgressReactEventHandler
onProgressCaptureReactEventHandler
onRateChangeReactEventHandler
onRateChangeCaptureReactEventHandler
onResetFormEventHandler
onResetCaptureFormEventHandler
onScrollUIEventHandler
onScrollCaptureUIEventHandler
onSeekedReactEventHandler
onSeekedCaptureReactEventHandler
onSeekingReactEventHandler
onSeekingCaptureReactEventHandler
onSelectReactEventHandler
onSelectCaptureReactEventHandler
onStalledReactEventHandler
onStalledCaptureReactEventHandler
onSubmitFormEventHandler
onSubmitCaptureFormEventHandler
onSuspendReactEventHandler
onSuspendCaptureReactEventHandler
onTimeUpdateReactEventHandler
onTimeUpdateCaptureReactEventHandler
onTouchCancelTouchEventHandler
onTouchCancelCaptureTouchEventHandler
onTouchEndTouchEventHandler
onTouchEndCaptureTouchEventHandler
onTouchMoveTouchEventHandler
onTouchMoveCaptureTouchEventHandler
onTouchStartTouchEventHandler
onTouchStartCaptureTouchEventHandler
onTransitionEndTransitionEventHandler
onTransitionEndCaptureTransitionEventHandler
onVolumeChangeReactEventHandler
onVolumeChangeCaptureReactEventHandler
onWaitingReactEventHandler
onWaitingCaptureReactEventHandler
onWheelWheelEventHandler
onWheelCaptureWheelEventHandler
paddingPadding | Padding[]
placeholderstring
prefixstring
propertystring
radioGroupstring
refRef
resourcestring
resultsnumber
roleAriaRole
securitystring
sizeXLstring | numberVisual size level, accepts:
XLARGE, LARGE, MEDIUM, XL, L, M
or a numeric size that fits in the GDS font scale list
slotstring
spellCheckBooleanish
styleCSSProperties
suppressContentEditableWarningboolean
suppressHydrationWarningboolean
tabIndexnumber
themeany
titlestring
translate"yes" | "no"
typeofstring
unselectable"on" | "off"
vocabstring

FAQs

Package last updated on 08 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc