Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tabs] Disable content prop #1709

Open
emavitta opened this issue Apr 23, 2024 · 4 comments
Open

[Tabs] Disable content prop #1709

emavitta opened this issue Apr 23, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@emavitta
Copy link

emavitta commented Apr 23, 2024

Description

I'm wondering if it could be possible to disable the content in the tabs component.
I'm using it with the @click to do other stuff on the page and i don't need the content. I could rebuild it with the headlessui component, but it could be a simple yet usefull feature.

Additional context

No response

@emavitta emavitta added the enhancement New feature or request label Apr 23, 2024
Copy link
Member

You can already use the Tabs without content, visually the only thing you'd need to change is override the wrapper to remove the spacing:

<UTabs v-model="selected" :items="items" :ui="{ wrapper: '' }" />

@emavitta
Copy link
Author

emavitta commented Apr 26, 2024

Thanks for your reply; i wasn't clearly enough, but i was suggesting a way to completely revmove the markup of the content, not only visually hiding it.

Maybe it's just i am a little bit too concerned about semantic and so on, but i do think it would be better to completely remove the content markup with something like this;

<HTabPanels :class="ui.container" v-if="contentVisible"> ...

where contentVisibile is a prop you can pass to the component (true by defult).

Does it make sense to you?

@emavitta
Copy link
Author

emavitta commented May 7, 2024

May i suggest a pr as an example?

Copy link
Member

Sure! I was just wondering about the prop naming, we can discuss that in the PR review 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants