# NoticeBar
### Install
```js
import { createApp } from 'vue';
import { NoticeBar } from 'vant';
const app = createApp();
app.use(NoticeBar);
```
## Usage
### Basic Usage
```html
```
### Scrollable
```html
```
### Wrapable
```html
Notice Content
```
### Mode
```html
Notice Content
Notice Content
```
### Custom Style
```html
Notice Content
```
### Vertical Scroll
```html
Content 1
Content 2
Content 3
```
## API
### Props
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| mode | Mode, can be set to `closeable` `link` | _string_ | `''` |
| text | Notice text content | _string_ | `''` | - |
| color | Text color | _string_ | `#f60` |
| background | Background color | _string_ | `#fff7cc` |
| left-icon | Left Icon | _string_ | - |
| delay | Animation delay (s) | _number \| string_ | `1` |
| speed | Scroll speed (px/s) | _number \| string_ | `50` |
| scrollable | Whether to scroll content | _boolean_ | - |
| wrapable | Whether to enable text wrap | _boolean_ | `false` | - |
### Events
| Event | Description | Arguments |
| ------ | ---------------------------------- | -------------- |
| click | Emitted when NoticeBar is clicked | _event: Event_ |
| close | Emitted when NoticeBar is closed | _event: Event_ |
| replay | Emitted when NoticeBar is replayed | - |
### Slots
| Name | Description |
| ---------- | ------------------- |
| default | Notice text content |
| left-icon | Custom left icon |
| right-icon | Custom right icon |
### Less Variables
How to use: [Custom Theme](#/en-US/theme).
| Name | Default Value | Description |
| ---------------------------- | ------------------------- | ----------- |
| @notice-bar-height | `40px` | - |
| @notice-bar-padding | `0 @padding-md` | - |
| @notice-bar-wrapable-padding | `@padding-xs @padding-md` | - |
| @notice-bar-text-color | `@orange-dark` | - |
| @notice-bar-font-size | `@font-size-md` | - |
| @notice-bar-line-height | `24px` | - |
| @notice-bar-background-color | `@orange-light` | - |
| @notice-bar-icon-size | `16px` | - |
| @notice-bar-icon-min-width | `24px` | - |