2020-03-30 18:44:49 +08:00
---
order: 6.1
title:
zh-CN: 轮播的公告
en-US: Loop Banner
---
## zh-CN
2021-10-14 15:48:33 +08:00
配合 [react-text-loop-next ](https://npmjs.com/package/react-text-loop-next ) 或 [react-fast-marquee ](https://npmjs.com/package/react-fast-marquee ) 实现消息轮播通知栏。
2020-03-30 18:44:49 +08:00
## en-US
2021-10-14 15:48:33 +08:00
Show a loop banner by using with [react-text-loop-next ](https://npmjs.com/package/react-text-loop-next ) or [react-fast-marquee ](https://npmjs.com/package/react-fast-marquee ).
2020-03-30 18:44:49 +08:00
```tsx
import { Alert } from 'antd';
2022-05-23 14:37:16 +08:00
import React from 'react';
2021-10-14 15:48:33 +08:00
import Marquee from 'react-fast-marquee';
2020-03-30 18:44:49 +08:00
2022-05-19 09:46:26 +08:00
const App: React.FC = () => (
2022-06-10 17:06:07 +08:00
< Alert
banner
message={
< Marquee pauseOnHover gradient = {false} >
I can be a React component, multiple React components, or just some text.
< / Marquee >
}
/>
2020-03-30 18:44:49 +08:00
);
2022-05-19 09:46:26 +08:00
export default App;
2020-03-30 18:44:49 +08:00
```