Skip to content

bug: Vue IonTabBar missing slot prop type #30545

Open
@tdekoning

Description

@tdekoning

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

In a Vue application with a strict templates vue-tsc preset (that disallows undefined properties to be set), using the IonTabBar with a named slot (for example slot="bottom") leads to a TypeScript error.

This is due to the fact that vue-tsc doesn't recognise a slot prop.

Expected Behavior

I expect the component definition to include the slot property.

Steps to Reproduce

In a vue project with vue-tsc's configuration set like so (part of tsconfig.json)

"vueCompilerOptions": {
	"strictTemplates": true
}

Add this to any vue component's template:

<IonTabBar slot="bottom">
	<IonTabButton
		tab="tab-home"
		href="/tabs/tab-home"
	>
		<p>Home</p>
	</IonTabButton>
</IonTabBar>

Code Reproduction URL

https://stackblitz.com/edit/vue-kq5gzqta?file=package.json,src%2Fcomponents%2FHelloWorld.vue,tsconfig.json

Ionic Info

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/vue 8.6.2

Capacitor:

Capacitor CLI : not installed
@capacitor/android : 7.4.0
@capacitor/core : 7.4.0
@capacitor/ios : 7.4.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.17.0
npm : 11.0.0
OS : macOS Unknown

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions