naive-ui/demo/documentation/components/button/enUS/group.md

113 lines
1.7 KiB
Markdown
Raw Normal View History

2019-09-22 22:59:29 +08:00
# Button Group
Button can be grouped.
```html
<n-button-group vertical>
2019-09-22 22:59:29 +08:00
<n-button
round
>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
Live a
2019-09-22 22:59:29 +08:00
</n-button>
<n-button
ghost
>
<template v-slot:icon>
<log-in-outline />
</template>
Sufficient
</n-button>
<n-button>
<template v-slot:icon>
<log-in-outline />
</template>
Life
</n-button>
</n-button-group>
<n-button-group vertical size="large">
<n-button>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
With
2019-09-22 22:59:29 +08:00
</n-button>
<n-button>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
Enough
2019-09-22 22:59:29 +08:00
</n-button>
<n-button
ghost
round
2019-09-22 22:59:29 +08:00
>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
Happiness
2019-09-22 22:59:29 +08:00
</n-button>
</n-button-group>
<n-button-group size="small">
2019-09-22 22:59:29 +08:00
<n-button
round
>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
</template>
Life
</n-button>
<n-button>
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
Is
2019-09-22 22:59:29 +08:00
</n-button>
<n-button>
<template v-slot:icon>
<log-in-outline />
</template>
Good
</n-button>
</n-button-group>
<n-button-group>
2019-09-22 22:59:29 +08:00
<n-button
ghost
2019-09-22 22:59:29 +08:00
>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
Eat
2019-09-22 22:59:29 +08:00
</n-button>
<n-button
ghost
2019-09-22 22:59:29 +08:00
>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
One More
2019-09-22 22:59:29 +08:00
</n-button>
<n-button
round
2019-09-22 22:59:29 +08:00
>
2019-10-24 18:04:31 +08:00
<template v-slot:icon>
<log-in-outline />
2019-10-24 18:04:31 +08:00
</template>
Apple
2019-09-22 22:59:29 +08:00
</n-button>
</n-button-group>
```
2019-10-24 18:04:31 +08:00
```js
import logInOutline from 'naive-ui/lib/icons/log-in-outline'
2019-10-24 18:04:31 +08:00
export default {
components: {
logInOutline
2019-10-24 18:04:31 +08:00
}
}
```
2019-09-22 22:59:29 +08:00
```css
.n-button-group {
margin: 0 12px 12px 0;
2019-09-22 22:59:29 +08:00
}
```