Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45a515d

Browse files
committed
feat(CTabPane): add the transition property to enable control of fade animation on panels
1 parent 96cee23 commit 45a515d

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

packages/coreui-vue/src/components/tabs/CTabPane.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import { executeAfterTransition } from '../../utils/transition'
55
const CTabPane = defineComponent({
66
name: 'CTabPane',
77
props: {
8+
/**
9+
* Enable fade in and fade out transition.
10+
*
11+
* @since 5.1.0
12+
*/
13+
transition: {
14+
type: Boolean,
15+
default: true,
16+
},
817
/**
918
* Toggle the visibility of component.
1019
*/
@@ -57,9 +66,9 @@ const CTabPane = defineComponent({
5766
{
5867
class: [
5968
'tab-pane',
60-
'fade',
6169
{
6270
active: props.visible,
71+
fade: props.transition,
6372
show: firstRender.value && props.visible,
6473
},
6574
],

packages/docs/api/tabs/CTabPane.api.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import CTabPane from '@coreui/vue/src/components/tabs/CTabPane'
88

99
#### Props
1010

11-
| Prop name | Description | Type | Values | Default |
12-
| ----------- | ----------------------------------- | ------- | ------ | ------- |
13-
| **visible** | Toggle the visibility of component. | boolean | - | false |
11+
| Prop name | Description | Type | Values | Default |
12+
| ------------------------------------------------------------- | --------------------------------------- | ------- | ------ | ------- |
13+
| **transition** <br><div class="badge bg-primary">5.1.0+</div> | Enable fade in and fade out transition. | boolean | - | true |
14+
| **visible** | Toggle the visibility of component. | boolean | - | false |
1415

1516
#### Events
1617

0 commit comments

Comments
 (0)