--- title: Script description: >- Use the `Script` component to add third-party scripts to your app. It automatically adds a nonce attribute from your [content security policy](/docs/custom-storefronts/hydrogen/content-security-policy). If you load a script that directly modifies the DOM, you are likely to have hydration errors. Use the `waitForHydration` prop to load the script after the page hydrates. api_version: 2024-10 api_name: hydrogen source_url: html: 'https://shopify.dev/docs/api/hydrogen/latest/components/script' md: 'https://shopify.dev/docs/api/hydrogen/latest/components/script.md' --- # Script Use the `Script` component to add third-party scripts to your app. It automatically adds a nonce attribute from your [content security policy](https://shopify.dev/docs/custom-storefronts/hydrogen/content-security-policy). If you load a script that directly modifies the DOM, you are likely to have hydration errors. Use the `waitForHydration` prop to load the script after the page hydrates. ## Props **`HydrogenScriptProps & ScriptAttributes`** ### HydrogenScriptProps * **waitForHydration** **boolean** Wait to load the script until after the page hydrates. This prevents hydration errors for scripts that modify the DOM. Note: For security, `nonce` is not supported when using `waitForHydration`. Instead you need to add the domain of the script directly to your [Content Securitiy Policy directives](https://shopify.dev/docs/storefronts/headless/hydrogen/content-security-policy#step-3-customize-the-content-security-policy). ### ScriptAttributes * **about** **string | undefined** * **accessKey** **string | undefined** * **aria-activedescendant** **string | undefined** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. * **aria-atomic** **Booleanish | undefined** 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** **'none' | 'inline' | 'list' | 'both' | undefined** 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-braillelabel** **string | undefined** Defines a string value that labels the current element, which is intended to be converted into Braille. * **aria-brailleroledescription** **string | undefined** Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. * **aria-busy** **Booleanish | undefined** * **aria-checked** **boolean | 'false' | 'mixed' | 'true' | undefined** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * **aria-colcount** **number | undefined** Defines the total number of columns in a table, grid, or treegrid. * **aria-colindex** **number | undefined** Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * **aria-colindextext** **string | undefined** Defines a human readable text alternative of aria-colindex. * **aria-colspan** **number | undefined** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * **aria-controls** **string | undefined** Identifies the element (or elements) whose contents or presence are controlled by the current element. * **aria-current** **boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time' | undefined** Indicates the element that represents the current item within a container or set of related elements. * **aria-describedby** **string | undefined** Identifies the element (or elements) that describes the object. * **aria-description** **string | undefined** Defines a string value that describes or annotates the current element. * **aria-details** **string | undefined** Identifies the element that provides a detailed, extended description for the object. * **aria-disabled** **Booleanish | undefined** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * **aria-errormessage** **string | undefined** Identifies the element that provides an error message for the object. * **aria-expanded** **Booleanish | undefined** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. * **aria-flowto** **string | undefined** Identifies 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-haspopup** **boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. * **aria-hidden** **Booleanish | undefined** Indicates whether the element is exposed to an accessibility API. * **aria-invalid** **boolean | 'false' | 'true' | 'grammar' | 'spelling' | undefined** Indicates the entered value does not conform to the format expected by the application. * **aria-keyshortcuts** **string | undefined** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. * **aria-label** **string | undefined** Defines a string value that labels the current element. * **aria-labelledby** **string | undefined** Identifies the element (or elements) that labels the current element. * **aria-level** **number | undefined** Defines the hierarchical level of an element within a structure. * **aria-live** **'off' | 'assertive' | 'polite' | undefined** 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-modal** **Booleanish | undefined** Indicates whether an element is modal when displayed. * **aria-multiline** **Booleanish | undefined** Indicates whether a text box accepts multiple lines of input or only a single line. * **aria-multiselectable** **Booleanish | undefined** Indicates that the user may select more than one item from the current selectable descendants. * **aria-orientation** **'horizontal' | 'vertical' | undefined** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. * **aria-owns** **string | undefined** Identifies 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-placeholder** **string | undefined** Defines 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-posinset** **number | undefined** Defines 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** **boolean | 'false' | 'mixed' | 'true' | undefined** Indicates the current "pressed" state of toggle buttons. * **aria-readonly** **Booleanish | undefined** Indicates 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' | undefined** Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. * **aria-required** **Booleanish | undefined** Indicates that user input is required on the element before a form may be submitted. * **aria-roledescription** **string | undefined** Defines a human-readable, author-localized description for the role of an element. * **aria-rowcount** **number | undefined** Defines the total number of rows in a table, grid, or treegrid. * **aria-rowindex** **number | undefined** Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * **aria-rowindextext** **string | undefined** Defines a human readable text alternative of aria-rowindex. * **aria-rowspan** **number | undefined** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * **aria-selected** **Booleanish | undefined** Indicates the current "selected" state of various widgets. * **aria-setsize** **number | undefined** Defines 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** **'none' | 'ascending' | 'descending' | 'other' | undefined** Indicates if items in a table or grid are sorted in ascending or descending order. * **aria-valuemax** **number | undefined** Defines the maximum allowed value for a range widget. * **aria-valuemin** **number | undefined** Defines the minimum allowed value for a range widget. * **aria-valuenow** **number | undefined** Defines the current value for a range widget. * **aria-valuetext** **string | undefined** Defines the human readable text alternative of aria-valuenow for a range widget. * **async** **boolean | undefined** * **autoCapitalize** **string | undefined** * **autoCorrect** **string | undefined** * **autoFocus** **boolean | undefined** * **autoSave** **string | undefined** * **children** **ReactNode | undefined** * **className** **string | undefined** * **color** **string | undefined** * **content** **string | undefined** * **contentEditable** **Booleanish | "inherit" | undefined** * **contextMenu** **string | undefined** * **crossOrigin** **CrossOrigin** * **dangerouslySetInnerHTML** **{ // Should be InnerHTML\['innerHTML']. // But unfortunately we're mixing renderer-specific type declarations. \_\_html: string | TrustedHTML; } | undefined** * **datatype** **string | undefined** * **defaultChecked** **boolean | undefined** * **defaultValue** **string | number | ReadonlyArray\ | undefined** * **defer** **boolean | undefined** * **dir** **string | undefined** * **draggable** **Booleanish | undefined** * **hidden** **boolean | undefined** * **id** **string | undefined** * **inlist** **any** * **inputMode** **'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' | undefined** Hints at the type of data that might be entered by the user while editing the element or its contents * **integrity** **string | undefined** * **is** **string | undefined** Specify that a standard HTML element should behave like a defined custom built-in element * **itemID** **string | undefined** * **itemProp** **string | undefined** * **itemRef** **string | undefined** * **itemScope** **boolean | undefined** * **itemType** **string | undefined** * **lang** **string | undefined** * **noModule** **boolean | undefined** * **nonce** **string | undefined** * **onAbort** **ReactEventHandler\ | undefined** * **onAbortCapture** **ReactEventHandler\ | undefined** * **onAnimationEnd** **AnimationEventHandler\ | undefined** * **onAnimationEndCapture** **AnimationEventHandler\ | undefined** * **onAnimationIteration** **AnimationEventHandler\ | undefined** * **onAnimationIterationCapture** **AnimationEventHandler\ | undefined** * **onAnimationStart** **AnimationEventHandler\ | undefined** * **onAnimationStartCapture** **AnimationEventHandler\ | undefined** * **onAuxClick** **MouseEventHandler\ | undefined** * **onAuxClickCapture** **MouseEventHandler\ | undefined** * **onBeforeInput** **FormEventHandler\ | undefined** * **onBeforeInputCapture** **FormEventHandler\ | undefined** * **onBlur** **FocusEventHandler\ | undefined** * **onBlurCapture** **FocusEventHandler\ | undefined** * **onCanPlay** **ReactEventHandler\ | undefined** * **onCanPlayCapture** **ReactEventHandler\ | undefined** * **onCanPlayThrough** **ReactEventHandler\ | undefined** * **onCanPlayThroughCapture** **ReactEventHandler\ | undefined** * **onChange** **FormEventHandler\ | undefined** * **onChangeCapture** **FormEventHandler\ | undefined** * **onClick** **MouseEventHandler\ | undefined** * **onClickCapture** **MouseEventHandler\ | undefined** * **onCompositionEnd** **CompositionEventHandler\ | undefined** * **onCompositionEndCapture** **CompositionEventHandler\ | undefined** * **onCompositionStart** **CompositionEventHandler\ | undefined** * **onCompositionStartCapture** **CompositionEventHandler\ | undefined** * **onCompositionUpdate** **CompositionEventHandler\ | undefined** * **onCompositionUpdateCapture** **CompositionEventHandler\ | undefined** * **onContextMenu** **MouseEventHandler\ | undefined** * **onContextMenuCapture** **MouseEventHandler\ | undefined** * **onCopy** **ClipboardEventHandler\ | undefined** * **onCopyCapture** **ClipboardEventHandler\ | undefined** * **onCut** **ClipboardEventHandler\ | undefined** * **onCutCapture** **ClipboardEventHandler\ | undefined** * **onDoubleClick** **MouseEventHandler\ | undefined** * **onDoubleClickCapture** **MouseEventHandler\ | undefined** * **onDrag** **DragEventHandler\ | undefined** * **onDragCapture** **DragEventHandler\ | undefined** * **onDragEnd** **DragEventHandler\ | undefined** * **onDragEndCapture** **DragEventHandler\ | undefined** * **onDragEnter** **DragEventHandler\ | undefined** * **onDragEnterCapture** **DragEventHandler\ | undefined** * **onDragExit** **DragEventHandler\ | undefined** * **onDragExitCapture** **DragEventHandler\ | undefined** * **onDragLeave** **DragEventHandler\ | undefined** * **onDragLeaveCapture** **DragEventHandler\ | undefined** * **onDragOver** **DragEventHandler\ | undefined** * **onDragOverCapture** **DragEventHandler\ | undefined** * **onDragStart** **DragEventHandler\ | undefined** * **onDragStartCapture** **DragEventHandler\ | undefined** * **onDrop** **DragEventHandler\ | undefined** * **onDropCapture** **DragEventHandler\ | undefined** * **onDurationChange** **ReactEventHandler\ | undefined** * **onDurationChangeCapture** **ReactEventHandler\ | undefined** * **onEmptied** **ReactEventHandler\ | undefined** * **onEmptiedCapture** **ReactEventHandler\ | undefined** * **onEncrypted** **ReactEventHandler\ | undefined** * **onEncryptedCapture** **ReactEventHandler\ | undefined** * **onEnded** **ReactEventHandler\ | undefined** * **onEndedCapture** **ReactEventHandler\ | undefined** * **onError** **ReactEventHandler\ | undefined** * **onErrorCapture** **ReactEventHandler\ | undefined** * **onFocus** **FocusEventHandler\ | undefined** * **onFocusCapture** **FocusEventHandler\ | undefined** * **onGotPointerCapture** **PointerEventHandler\ | undefined** * **onGotPointerCaptureCapture** **PointerEventHandler\ | undefined** * **onInput** **FormEventHandler\ | undefined** * **onInputCapture** **FormEventHandler\ | undefined** * **onInvalid** **FormEventHandler\ | undefined** * **onInvalidCapture** **FormEventHandler\ | undefined** * **onKeyDown** **KeyboardEventHandler\ | undefined** * **onKeyDownCapture** **KeyboardEventHandler\ | undefined** * **onKeyUp** **KeyboardEventHandler\ | undefined** * **onKeyUpCapture** **KeyboardEventHandler\ | undefined** * **onLoad** **ReactEventHandler\ | undefined** * **onLoadCapture** **ReactEventHandler\ | undefined** * **onLoadedData** **ReactEventHandler\ | undefined** * **onLoadedDataCapture** **ReactEventHandler\ | undefined** * **onLoadedMetadata** **ReactEventHandler\ | undefined** * **onLoadedMetadataCapture** **ReactEventHandler\ | undefined** * **onLoadStart** **ReactEventHandler\ | undefined** * **onLoadStartCapture** **ReactEventHandler\ | undefined** * **onLostPointerCapture** **PointerEventHandler\ | undefined** * **onLostPointerCaptureCapture** **PointerEventHandler\ | undefined** * **onMouseDown** **MouseEventHandler\ | undefined** * **onMouseDownCapture** **MouseEventHandler\ | undefined** * **onMouseEnter** **MouseEventHandler\ | undefined** * **onMouseLeave** **MouseEventHandler\ | undefined** * **onMouseMove** **MouseEventHandler\ | undefined** * **onMouseMoveCapture** **MouseEventHandler\ | undefined** * **onMouseOut** **MouseEventHandler\ | undefined** * **onMouseOutCapture** **MouseEventHandler\ | undefined** * **onMouseOver** **MouseEventHandler\ | undefined** * **onMouseOverCapture** **MouseEventHandler\ | undefined** * **onMouseUp** **MouseEventHandler\ | undefined** * **onMouseUpCapture** **MouseEventHandler\ | undefined** * **onPaste** **ClipboardEventHandler\ | undefined** * **onPasteCapture** **ClipboardEventHandler\ | undefined** * **onPause** **ReactEventHandler\ | undefined** * **onPauseCapture** **ReactEventHandler\ | undefined** * **onPlay** **ReactEventHandler\ | undefined** * **onPlayCapture** **ReactEventHandler\ | undefined** * **onPlaying** **ReactEventHandler\ | undefined** * **onPlayingCapture** **ReactEventHandler\ | undefined** * **onPointerCancel** **PointerEventHandler\ | undefined** * **onPointerCancelCapture** **PointerEventHandler\ | undefined** * **onPointerDown** **PointerEventHandler\ | undefined** * **onPointerDownCapture** **PointerEventHandler\ | undefined** * **onPointerEnter** **PointerEventHandler\ | undefined** * **onPointerEnterCapture** **PointerEventHandler\ | undefined** * **onPointerLeave** **PointerEventHandler\ | undefined** * **onPointerLeaveCapture** **PointerEventHandler\ | undefined** * **onPointerMove** **PointerEventHandler\ | undefined** * **onPointerMoveCapture** **PointerEventHandler\ | undefined** * **onPointerOut** **PointerEventHandler\ | undefined** * **onPointerOutCapture** **PointerEventHandler\ | undefined** * **onPointerOver** **PointerEventHandler\ | undefined** * **onPointerOverCapture** **PointerEventHandler\ | undefined** * **onPointerUp** **PointerEventHandler\ | undefined** * **onPointerUpCapture** **PointerEventHandler\ | undefined** * **onProgress** **ReactEventHandler\ | undefined** * **onProgressCapture** **ReactEventHandler\ | undefined** * **onRateChange** **ReactEventHandler\ | undefined** * **onRateChangeCapture** **ReactEventHandler\ | undefined** * **onReset** **FormEventHandler\ | undefined** * **onResetCapture** **FormEventHandler\ | undefined** * **onResize** **ReactEventHandler\ | undefined** * **onResizeCapture** **ReactEventHandler\ | undefined** * **onScroll** **UIEventHandler\ | undefined** * **onScrollCapture** **UIEventHandler\ | undefined** * **onSeeked** **ReactEventHandler\ | undefined** * **onSeekedCapture** **ReactEventHandler\ | undefined** * **onSeeking** **ReactEventHandler\ | undefined** * **onSeekingCapture** **ReactEventHandler\ | undefined** * **onSelect** **ReactEventHandler\ | undefined** * **onSelectCapture** **ReactEventHandler\ | undefined** * **onStalled** **ReactEventHandler\ | undefined** * **onStalledCapture** **ReactEventHandler\ | undefined** * **onSubmit** **FormEventHandler\ | undefined** * **onSubmitCapture** **FormEventHandler\ | undefined** * **onSuspend** **ReactEventHandler\ | undefined** * **onSuspendCapture** **ReactEventHandler\ | undefined** * **onTimeUpdate** **ReactEventHandler\ | undefined** * **onTimeUpdateCapture** **ReactEventHandler\ | undefined** * **onTouchCancel** **TouchEventHandler\ | undefined** * **onTouchCancelCapture** **TouchEventHandler\ | undefined** * **onTouchEnd** **TouchEventHandler\ | undefined** * **onTouchEndCapture** **TouchEventHandler\ | undefined** * **onTouchMove** **TouchEventHandler\ | undefined** * **onTouchMoveCapture** **TouchEventHandler\ | undefined** * **onTouchStart** **TouchEventHandler\ | undefined** * **onTouchStartCapture** **TouchEventHandler\ | undefined** * **onTransitionEnd** **TransitionEventHandler\ | undefined** * **onTransitionEndCapture** **TransitionEventHandler\ | undefined** * **onVolumeChange** **ReactEventHandler\ | undefined** * **onVolumeChangeCapture** **ReactEventHandler\ | undefined** * **onWaiting** **ReactEventHandler\ | undefined** * **onWaitingCapture** **ReactEventHandler\ | undefined** * **onWheel** **WheelEventHandler\ | undefined** * **onWheelCapture** **WheelEventHandler\ | undefined** * **placeholder** **string | undefined** * **prefix** **string | undefined** * **property** **string | undefined** * **radioGroup** **string | undefined** * **referrerPolicy** **HTMLAttributeReferrerPolicy | undefined** * **rel** **string | undefined** * **resource** **string | undefined** * **results** **number | undefined** * **rev** **string | undefined** * **role** **AriaRole | undefined** * **security** **string | undefined** * **slot** **string | undefined** * **spellCheck** **Booleanish | undefined** * **src** **string | undefined** * **style** **CSSProperties | undefined** * **suppressContentEditableWarning** **boolean | undefined** * **suppressHydrationWarning** **boolean | undefined** * **tabIndex** **number | undefined** * **title** **string | undefined** * **translate** **'yes' | 'no' | undefined** * **type** **string | undefined** * **typeof** **string | undefined** * **unselectable** **'on' | 'off' | undefined** * **vocab** **string | undefined** * **aria-dropeffect** **'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup' | undefined** **deprecated** Indicates what functions can be performed when a dragged object is released on the drop target. **Deprecated:** in ARIA 1.1 * **aria-grabbed** **Booleanish | undefined** **deprecated** Indicates an element's "grabbed" state in a drag-and-drop operation. **Deprecated:** in ARIA 1.1 * **charSet** **string | undefined** **deprecated** **Deprecated:** Deprecated * **onKeyPress** **KeyboardEventHandler\ | undefined** **deprecated** **Deprecated:** Deprecated * **onKeyPressCapture** **KeyboardEventHandler\ | undefined** **deprecated** **Deprecated:** Deprecated ### HydrogenScriptProps * waitForHydration Wait to load the script until after the page hydrates. This prevents hydration errors for scripts that modify the DOM. Note: For security, \`nonce\` is not supported when using \`waitForHydration\`. Instead you need to add the domain of the script directly to your \[Content Securitiy Policy directives]\(https://shopify.dev/docs/storefronts/headless/hydrogen/content-security-policy#step-3-customize-the-content-security-policy). ```ts boolean ``` ```ts interface HydrogenScriptProps { /** Wait to load the script until after the page hydrates. This prevents hydration errors for scripts that modify the DOM. Note: For security, `nonce` is not supported when using `waitForHydration`. Instead you need to add the domain of the script directly to your [Content Securitiy Policy directives](https://shopify.dev/docs/storefronts/headless/hydrogen/content-security-policy#step-3-customize-the-content-security-policy).*/ waitForHydration?: boolean; } ``` ### ScriptAttributes * about ```ts string | undefined ``` * accessKey ```ts string | undefined ``` * aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. ```ts string | undefined ``` * aria-atomic 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. ```ts Booleanish | undefined ``` * aria-autocomplete 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. ```ts 'none' | 'inline' | 'list' | 'both' | undefined ``` * aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. ```ts string | undefined ``` * aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. ```ts string | undefined ``` * aria-busy ```ts Booleanish | undefined ``` * aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. ```ts boolean | 'false' | 'mixed' | 'true' | undefined ``` * aria-colcount Defines the total number of columns in a table, grid, or treegrid. ```ts number | undefined ``` * aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. ```ts number | undefined ``` * aria-colindextext Defines a human readable text alternative of aria-colindex. ```ts string | undefined ``` * aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. ```ts number | undefined ``` * aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. ```ts string | undefined ``` * aria-current Indicates the element that represents the current item within a container or set of related elements. ```ts boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time' | undefined ``` * aria-describedby Identifies the element (or elements) that describes the object. ```ts string | undefined ``` * aria-description Defines a string value that describes or annotates the current element. ```ts string | undefined ``` * aria-details Identifies the element that provides a detailed, extended description for the object. ```ts string | undefined ``` * aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. ```ts Booleanish | undefined ``` * aria-dropeffect Indicates what functions can be performed when a dragged object is released on the drop target. ```ts 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup' | undefined ``` * aria-errormessage Identifies the element that provides an error message for the object. ```ts string | undefined ``` * aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. ```ts Booleanish | undefined ``` * aria-flowto Identifies 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. ```ts string | undefined ``` * aria-grabbed Indicates an element's "grabbed" state in a drag-and-drop operation. ```ts Booleanish | undefined ``` * aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. ```ts boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined ``` * aria-hidden Indicates whether the element is exposed to an accessibility API. ```ts Booleanish | undefined ``` * aria-invalid Indicates the entered value does not conform to the format expected by the application. ```ts boolean | 'false' | 'true' | 'grammar' | 'spelling' | undefined ``` * aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. ```ts string | undefined ``` * aria-label Defines a string value that labels the current element. ```ts string | undefined ``` * aria-labelledby Identifies the element (or elements) that labels the current element. ```ts string | undefined ``` * aria-level Defines the hierarchical level of an element within a structure. ```ts number | undefined ``` * aria-live 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. ```ts 'off' | 'assertive' | 'polite' | undefined ``` * aria-modal Indicates whether an element is modal when displayed. ```ts Booleanish | undefined ``` * aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. ```ts Booleanish | undefined ``` * aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. ```ts Booleanish | undefined ``` * aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. ```ts 'horizontal' | 'vertical' | undefined ``` * aria-owns Identifies 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. ```ts string | undefined ``` * aria-placeholder Defines 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. ```ts string | undefined ``` * aria-posinset Defines 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. ```ts number | undefined ``` * aria-pressed Indicates the current "pressed" state of toggle buttons. ```ts boolean | 'false' | 'mixed' | 'true' | undefined ``` * aria-readonly Indicates that the element is not editable, but is otherwise operable. ```ts Booleanish | undefined ``` * aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. ```ts 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals' | undefined ``` * aria-required Indicates that user input is required on the element before a form may be submitted. ```ts Booleanish | undefined ``` * aria-roledescription Defines a human-readable, author-localized description for the role of an element. ```ts string | undefined ``` * aria-rowcount Defines the total number of rows in a table, grid, or treegrid. ```ts number | undefined ``` * aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. ```ts number | undefined ``` * aria-rowindextext Defines a human readable text alternative of aria-rowindex. ```ts string | undefined ``` * aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. ```ts number | undefined ``` * aria-selected Indicates the current "selected" state of various widgets. ```ts Booleanish | undefined ``` * aria-setsize Defines 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. ```ts number | undefined ``` * aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. ```ts 'none' | 'ascending' | 'descending' | 'other' | undefined ``` * aria-valuemax Defines the maximum allowed value for a range widget. ```ts number | undefined ``` * aria-valuemin Defines the minimum allowed value for a range widget. ```ts number | undefined ``` * aria-valuenow Defines the current value for a range widget. ```ts number | undefined ``` * aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. ```ts string | undefined ``` * async ```ts boolean | undefined ``` * autoCapitalize ```ts string | undefined ``` * autoCorrect ```ts string | undefined ``` * autoFocus ```ts boolean | undefined ``` * autoSave ```ts string | undefined ``` * charSet ```ts string | undefined ``` * children ```ts ReactNode | undefined ``` * className ```ts string | undefined ``` * color ```ts string | undefined ``` * content ```ts string | undefined ``` * contentEditable ```ts Booleanish | "inherit" | undefined ``` * contextMenu ```ts string | undefined ``` * crossOrigin ```ts CrossOrigin ``` * dangerouslySetInnerHTML ```ts { // Should be InnerHTML['innerHTML']. // But unfortunately we're mixing renderer-specific type declarations. __html: string | TrustedHTML; } | undefined ``` * datatype ```ts string | undefined ``` * defaultChecked ```ts boolean | undefined ``` * defaultValue ```ts string | number | ReadonlyArray | undefined ``` * defer ```ts boolean | undefined ``` * dir ```ts string | undefined ``` * draggable ```ts Booleanish | undefined ``` * hidden ```ts boolean | undefined ``` * id ```ts string | undefined ``` * inlist ```ts any ``` * inputMode Hints at the type of data that might be entered by the user while editing the element or its contents ```ts 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' | undefined ``` * integrity ```ts string | undefined ``` * is Specify that a standard HTML element should behave like a defined custom built-in element ```ts string | undefined ``` * itemID ```ts string | undefined ``` * itemProp ```ts string | undefined ``` * itemRef ```ts string | undefined ``` * itemScope ```ts boolean | undefined ``` * itemType ```ts string | undefined ``` * lang ```ts string | undefined ``` * noModule ```ts boolean | undefined ``` * nonce ```ts string | undefined ``` * onAbort ```ts ReactEventHandler | undefined ``` * onAbortCapture ```ts ReactEventHandler | undefined ``` * onAnimationEnd ```ts AnimationEventHandler | undefined ``` * onAnimationEndCapture ```ts AnimationEventHandler | undefined ``` * onAnimationIteration ```ts AnimationEventHandler | undefined ``` * onAnimationIterationCapture ```ts AnimationEventHandler | undefined ``` * onAnimationStart ```ts AnimationEventHandler | undefined ``` * onAnimationStartCapture ```ts AnimationEventHandler | undefined ``` * onAuxClick ```ts MouseEventHandler | undefined ``` * onAuxClickCapture ```ts MouseEventHandler | undefined ``` * onBeforeInput ```ts FormEventHandler | undefined ``` * onBeforeInputCapture ```ts FormEventHandler | undefined ``` * onBlur ```ts FocusEventHandler | undefined ``` * onBlurCapture ```ts FocusEventHandler | undefined ``` * onCanPlay ```ts ReactEventHandler | undefined ``` * onCanPlayCapture ```ts ReactEventHandler | undefined ``` * onCanPlayThrough ```ts ReactEventHandler | undefined ``` * onCanPlayThroughCapture ```ts ReactEventHandler | undefined ``` * onChange ```ts FormEventHandler | undefined ``` * onChangeCapture ```ts FormEventHandler | undefined ``` * onClick ```ts MouseEventHandler | undefined ``` * onClickCapture ```ts MouseEventHandler | undefined ``` * onCompositionEnd ```ts CompositionEventHandler | undefined ``` * onCompositionEndCapture ```ts CompositionEventHandler | undefined ``` * onCompositionStart ```ts CompositionEventHandler | undefined ``` * onCompositionStartCapture ```ts CompositionEventHandler | undefined ``` * onCompositionUpdate ```ts CompositionEventHandler | undefined ``` * onCompositionUpdateCapture ```ts CompositionEventHandler | undefined ``` * onContextMenu ```ts MouseEventHandler | undefined ``` * onContextMenuCapture ```ts MouseEventHandler | undefined ``` * onCopy ```ts ClipboardEventHandler | undefined ``` * onCopyCapture ```ts ClipboardEventHandler | undefined ``` * onCut ```ts ClipboardEventHandler | undefined ``` * onCutCapture ```ts ClipboardEventHandler | undefined ``` * onDoubleClick ```ts MouseEventHandler | undefined ``` * onDoubleClickCapture ```ts MouseEventHandler | undefined ``` * onDrag ```ts DragEventHandler | undefined ``` * onDragCapture ```ts DragEventHandler | undefined ``` * onDragEnd ```ts DragEventHandler | undefined ``` * onDragEndCapture ```ts DragEventHandler | undefined ``` * onDragEnter ```ts DragEventHandler | undefined ``` * onDragEnterCapture ```ts DragEventHandler | undefined ``` * onDragExit ```ts DragEventHandler | undefined ``` * onDragExitCapture ```ts DragEventHandler | undefined ``` * onDragLeave ```ts DragEventHandler | undefined ``` * onDragLeaveCapture ```ts DragEventHandler | undefined ``` * onDragOver ```ts DragEventHandler | undefined ``` * onDragOverCapture ```ts DragEventHandler | undefined ``` * onDragStart ```ts DragEventHandler | undefined ``` * onDragStartCapture ```ts DragEventHandler | undefined ``` * onDrop ```ts DragEventHandler | undefined ``` * onDropCapture ```ts DragEventHandler | undefined ``` * onDurationChange ```ts ReactEventHandler | undefined ``` * onDurationChangeCapture ```ts ReactEventHandler | undefined ``` * onEmptied ```ts ReactEventHandler | undefined ``` * onEmptiedCapture ```ts ReactEventHandler | undefined ``` * onEncrypted ```ts ReactEventHandler | undefined ``` * onEncryptedCapture ```ts ReactEventHandler | undefined ``` * onEnded ```ts ReactEventHandler | undefined ``` * onEndedCapture ```ts ReactEventHandler | undefined ``` * onError ```ts ReactEventHandler | undefined ``` * onErrorCapture ```ts ReactEventHandler | undefined ``` * onFocus ```ts FocusEventHandler | undefined ``` * onFocusCapture ```ts FocusEventHandler | undefined ``` * onGotPointerCapture ```ts PointerEventHandler | undefined ``` * onGotPointerCaptureCapture ```ts PointerEventHandler | undefined ``` * onInput ```ts FormEventHandler | undefined ``` * onInputCapture ```ts FormEventHandler | undefined ``` * onInvalid ```ts FormEventHandler | undefined ``` * onInvalidCapture ```ts FormEventHandler | undefined ``` * onKeyDown ```ts KeyboardEventHandler | undefined ``` * onKeyDownCapture ```ts KeyboardEventHandler | undefined ``` * onKeyPress ```ts KeyboardEventHandler | undefined ``` * onKeyPressCapture ```ts KeyboardEventHandler | undefined ``` * onKeyUp ```ts KeyboardEventHandler | undefined ``` * onKeyUpCapture ```ts KeyboardEventHandler | undefined ``` * onLoad ```ts ReactEventHandler | undefined ``` * onLoadCapture ```ts ReactEventHandler | undefined ``` * onLoadedData ```ts ReactEventHandler | undefined ``` * onLoadedDataCapture ```ts ReactEventHandler | undefined ``` * onLoadedMetadata ```ts ReactEventHandler | undefined ``` * onLoadedMetadataCapture ```ts ReactEventHandler | undefined ``` * onLoadStart ```ts ReactEventHandler | undefined ``` * onLoadStartCapture ```ts ReactEventHandler | undefined ``` * onLostPointerCapture ```ts PointerEventHandler | undefined ``` * onLostPointerCaptureCapture ```ts PointerEventHandler | undefined ``` * onMouseDown ```ts MouseEventHandler | undefined ``` * onMouseDownCapture ```ts MouseEventHandler | undefined ``` * onMouseEnter ```ts MouseEventHandler | undefined ``` * onMouseLeave ```ts MouseEventHandler | undefined ``` * onMouseMove ```ts MouseEventHandler | undefined ``` * onMouseMoveCapture ```ts MouseEventHandler | undefined ``` * onMouseOut ```ts MouseEventHandler | undefined ``` * onMouseOutCapture ```ts MouseEventHandler | undefined ``` * onMouseOver ```ts MouseEventHandler | undefined ``` * onMouseOverCapture ```ts MouseEventHandler | undefined ``` * onMouseUp ```ts MouseEventHandler | undefined ``` * onMouseUpCapture ```ts MouseEventHandler | undefined ``` * onPaste ```ts ClipboardEventHandler | undefined ``` * onPasteCapture ```ts ClipboardEventHandler | undefined ``` * onPause ```ts ReactEventHandler | undefined ``` * onPauseCapture ```ts ReactEventHandler | undefined ``` * onPlay ```ts ReactEventHandler | undefined ``` * onPlayCapture ```ts ReactEventHandler | undefined ``` * onPlaying ```ts ReactEventHandler | undefined ``` * onPlayingCapture ```ts ReactEventHandler | undefined ``` * onPointerCancel ```ts PointerEventHandler | undefined ``` * onPointerCancelCapture ```ts PointerEventHandler | undefined ``` * onPointerDown ```ts PointerEventHandler | undefined ``` * onPointerDownCapture ```ts PointerEventHandler | undefined ``` * onPointerEnter ```ts PointerEventHandler | undefined ``` * onPointerEnterCapture ```ts PointerEventHandler | undefined ``` * onPointerLeave ```ts PointerEventHandler | undefined ``` * onPointerLeaveCapture ```ts PointerEventHandler | undefined ``` * onPointerMove ```ts PointerEventHandler | undefined ``` * onPointerMoveCapture ```ts PointerEventHandler | undefined ``` * onPointerOut ```ts PointerEventHandler | undefined ``` * onPointerOutCapture ```ts PointerEventHandler | undefined ``` * onPointerOver ```ts PointerEventHandler | undefined ``` * onPointerOverCapture ```ts PointerEventHandler | undefined ``` * onPointerUp ```ts PointerEventHandler | undefined ``` * onPointerUpCapture ```ts PointerEventHandler | undefined ``` * onProgress ```ts ReactEventHandler | undefined ``` * onProgressCapture ```ts ReactEventHandler | undefined ``` * onRateChange ```ts ReactEventHandler | undefined ``` * onRateChangeCapture ```ts ReactEventHandler | undefined ``` * onReset ```ts FormEventHandler | undefined ``` * onResetCapture ```ts FormEventHandler | undefined ``` * onResize ```ts ReactEventHandler | undefined ``` * onResizeCapture ```ts ReactEventHandler | undefined ``` * onScroll ```ts UIEventHandler | undefined ``` * onScrollCapture ```ts UIEventHandler | undefined ``` * onSeeked ```ts ReactEventHandler | undefined ``` * onSeekedCapture ```ts ReactEventHandler | undefined ``` * onSeeking ```ts ReactEventHandler | undefined ``` * onSeekingCapture ```ts ReactEventHandler | undefined ``` * onSelect ```ts ReactEventHandler | undefined ``` * onSelectCapture ```ts ReactEventHandler | undefined ``` * onStalled ```ts ReactEventHandler | undefined ``` * onStalledCapture ```ts ReactEventHandler | undefined ``` * onSubmit ```ts FormEventHandler | undefined ``` * onSubmitCapture ```ts FormEventHandler | undefined ``` * onSuspend ```ts ReactEventHandler | undefined ``` * onSuspendCapture ```ts ReactEventHandler | undefined ``` * onTimeUpdate ```ts ReactEventHandler | undefined ``` * onTimeUpdateCapture ```ts ReactEventHandler | undefined ``` * onTouchCancel ```ts TouchEventHandler | undefined ``` * onTouchCancelCapture ```ts TouchEventHandler | undefined ``` * onTouchEnd ```ts TouchEventHandler | undefined ``` * onTouchEndCapture ```ts TouchEventHandler | undefined ``` * onTouchMove ```ts TouchEventHandler | undefined ``` * onTouchMoveCapture ```ts TouchEventHandler | undefined ``` * onTouchStart ```ts TouchEventHandler | undefined ``` * onTouchStartCapture ```ts TouchEventHandler | undefined ``` * onTransitionEnd ```ts TransitionEventHandler | undefined ``` * onTransitionEndCapture ```ts TransitionEventHandler | undefined ``` * onVolumeChange ```ts ReactEventHandler | undefined ``` * onVolumeChangeCapture ```ts ReactEventHandler | undefined ``` * onWaiting ```ts ReactEventHandler | undefined ``` * onWaitingCapture ```ts ReactEventHandler | undefined ``` * onWheel ```ts WheelEventHandler | undefined ``` * onWheelCapture ```ts WheelEventHandler | undefined ``` * placeholder ```ts string | undefined ``` * prefix ```ts string | undefined ``` * property ```ts string | undefined ``` * radioGroup ```ts string | undefined ``` * referrerPolicy ```ts HTMLAttributeReferrerPolicy | undefined ``` * rel ```ts string | undefined ``` * resource ```ts string | undefined ``` * results ```ts number | undefined ``` * rev ```ts string | undefined ``` * role ```ts AriaRole | undefined ``` * security ```ts string | undefined ``` * slot ```ts string | undefined ``` * spellCheck ```ts Booleanish | undefined ``` * src ```ts string | undefined ``` * style ```ts CSSProperties | undefined ``` * suppressContentEditableWarning ```ts boolean | undefined ``` * suppressHydrationWarning ```ts boolean | undefined ``` * tabIndex ```ts number | undefined ``` * title ```ts string | undefined ``` * translate ```ts 'yes' | 'no' | undefined ``` * type ```ts string | undefined ``` * typeof ```ts string | undefined ``` * unselectable ```ts 'on' | 'off' | undefined ``` * vocab ```ts string | undefined ``` ```ts interface ScriptAttributes extends ScriptHTMLAttributes {} ``` Examples ### Examples * #### Example code ##### Description I am the default example ##### JavaScript ```jsx import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration, } from '@remix-run/react'; import {useNonce, Script} from '@shopify/hydrogen'; export default function App() { const nonce = useNonce(); return ( {/* Note you don't need to pass a nonce to the script component because it's automatically added */}