vant/src-next/divider/README.md
2020-07-06 15:31:36 +08:00

64 lines
977 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Divider
### Install
```js
import Vue from 'vue';
import { Divider } from 'vant';
Vue.use(Divider);
```
## Usage
### Basic Usage
```html
<van-divider />
```
### With Text
```html
<van-divider>Text</van-divider>
```
### Content Position
```html
<van-divider content-position="left">Text</van-divider>
<van-divider content-position="right">Text</van-divider>
```
### Dashed
```html
<van-divider dashed>Text</van-divider>
```
### Custom Style
```html
<van-divider
:style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }"
>
Text
</van-divider>
```
## API
### Props
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| dashed | Whether to use dashed border | _boolean_ | `false` |
| hairline | Whether to use hairline | _boolean_ | `true` |
| content-position | Content positioncan be set to `left` `right` | _string_ | `center` |
### Slots
| Name | Description |
| ------- | ----------- |
| default | content |