ui/Marquee
A component that will marquee its overflowing contents.
Members
Section titled “Members ”Marquee Component
Section titled “Marquee   Component ”A minimally-styled marquee component.
Extends:
ui/Marqueeui/Marquee.MarqueeBase
Wrapped with:
ui/Marqueeui/Marquee.MarqueeDecorator
MarqueeBase Component
Section titled “MarqueeBase   Component ”Marquees the children of the component.
For automated marquee calculations use ui/Marqueeui/Marquee.Marquee.
Properties
alignment
Section titled “alignment”Text alignment value of the marquee
Valid values are:
'left','right', and'center'
animating
Section titled “animating”Applies animating styles such as removing the ellipsis.
aria-label
Section titled “aria-label”Sets the value of the aria-label attribute for the wrapped component.
children
Section titled “children”The text or a set of components that should be marqueed
This prop may be empty in some cases, which is OK.
Called when mounting or unmounting with a reference to the client node
Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
marquee- The root component classanimate- Applied to the inner content node when the text is animatingspacing- The spacing node used between the repeated contenttext- The inner content nodewillAnimate- Applied to the inner content node shortly before animation
distance
Section titled “distance”Distance to animate the marquee
Usually, the distance is the width of the text minus the width of the container
onMarqueeComplete
Section titled “onMarqueeComplete”Called when the marquee completes its animation
Text overflow setting. Either 'clip' or 'ellipsis'
true if the directionality of the content is right-to-left
spacing
Section titled “spacing”Amount of spacing, in pixels, between the instances of the content
Default: 0Speed of marquee animation in pixels/second.
willAnimate
Section titled “willAnimate”Indicates the marquee will animate soon.
Should be used by the component to prepare itself for animation such as promoting composite layers for improved performance.
Default: falseMarqueeController Higher-Order Component
Section titled “MarqueeController   Higher-Order Component ”A higher-order component that synchronizes contained Marquees.
Configuration
marqueeOnFocus
Section titled “marqueeOnFocus”When true, any onFocus events that bubble to the controller will start the contained
Marquee instances. This is useful when a component contains Marquee instances that need to be
started when sibling components are focused.
MarqueeDecorator Higher-Order Component
Section titled “MarqueeDecorator   Higher-Order Component ”A higher-order component that provides marquee functionalities.
Note: This HoC passes additional properties to the wrapped component and wraps the children
prop with an additional component necessary for rendering the marquee.
Configuration
Property containing the callback to stop the animation when marqueeOn is 'focus'
component
Section titled “component”The base marquee component wrapping the content.
Default: ui/Marquee.MarqueeCustomizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
marquee- The root component classanimate- Applied to the inner content node when the text is animatingspacing- The spacing node used between the repeated contenttext- The inner content nodewillAnimate- Applied to the inner content node shortly before animation
Property containing the callback to start the animation when marqueeOn is 'hover'
Property containing the callback to start the animation when marqueeOn is 'focus'
invalidateProps
Section titled “invalidateProps”Invalidate the distance if any property (like 'inline') changes. Expects an array of props which on change trigger invalidateMetrics.
Default: ['remeasure']Property containing the callback to stop the animation when marqueeOn is 'hover'
marqueeDirection
Section titled “marqueeDirection”A function that determines the text directionality of a string.
Returns:
'rtl'if the text should marquee to the right'ltr'if the text should marquee to the left
Properties added to wrapped component
alignment
Section titled “alignment”Text alignment value of the marquee. Valid values are 'left', 'right' and 'center'.
children
Section titled “children”Children to be marqueed
disabled
Section titled “disabled”Passed through to the wrapped component.
Does not affect Marquee behavior except that components that are marqueeOn="focus"
will be treated as if they were marqueeOn="hover", to allow disabled (and thus,
unfocusable) components to marquee.
forceDirection
Section titled “forceDirection”Forces the direction of the marquee.
Valid values are 'rtl', 'ltr', and 'locale'. This includes non-text elements as well.
The default behavior, if this prop is unset, is to evaluate the text content for
directionality using i18n/utili18n/util.isRtlText.
If 'locale', the direction is determined by the locale, same as ui/Marqueeui/Marquee.MarqueeDecorator.rtl.
In other words, it will not consider the text content for determining the direction.
locale
Section titled “locale”The current locale as a https://toolshttps://tools.ietf.org/html/rfc5646.
marqueeDelay
Section titled “marqueeDelay”Number of milliseconds to wait before starting marquee when marqueeOn is 'hover' or
'focus' or before restarting any marquee.
marqueeDisabled
Section titled “marqueeDisabled”Disables all marquee behavior and removes supporting markup.
Determines what triggers the marquee to start its animation.
Default: 'focus'marqueeOnRenderDelay
Section titled “marqueeOnRenderDelay”Number of milliseconds to wait before starting marquee the first time.
Has no effect if marqueeOn is not 'render'
marqueeResetDelay
Section titled “marqueeResetDelay”Number of milliseconds to wait before resetting the marquee position after it finishes.
A minimum of 40 milliseconds is enforced.
Default: 1000Amount of spacing between the instances of the content when animating.
May either be a number indicating the number of pixels or a string indicating the percentage relative to the width of the component.
Note: When using a number, the value should be based on 1920x1080 display and will be scaled automatically for the current resolution using ui/resolutionui/resolution.
Default: '50%'marqueeSpeed
Section titled “marqueeSpeed”Rate of marquee measured in pixels/second.
Default: 60Indicates the text directionality of the current locale is right-to-left