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

PrimeVue: Tailwind CSS Sidebar component is not working. Could someone please explain it why? #209

Open
tareqWpy opened this issue Apr 6, 2024 · 1 comment
Labels
question Issue contains a question about the use of PrimeVue components or the products it supports

Comments

@tareqWpy
Copy link

tareqWpy commented Apr 6, 2024

I'm trying to use the codes of the component in this page
https://tailwind.primevue.org/sidebar/
and when I'm trying to copy and paste the exact same codes, the

v-styleclass="{
			selector: '@next',
			enterClass: 'hidden',
			enterActiveClass: 'slidedown',
			leaveToClass: 'hidden',
			leaveActiveClass: 'slideup',
}"

Does not work at all. I'm coping and pasting the exact same codes.

@atakantepe
Copy link
Member

Hi, the code you provided is from the headless demo, which is for animating collapsable items inside the sidebar.

<template>
    <div class="card flex justify-center">
        <Sidebar v-model:visible="visible" header="Sidebar">
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
        </Sidebar>
        <Button icon="pi pi-arrow-right" @click="visible = true" />
    </div>
</template>

<script>
export default {
    data() {
        return {
            visible: false
        }
    }
}
</script>

This code should work. If you want to change the inside of it, you can check the headless demo.

@atakantepe atakantepe added the question Issue contains a question about the use of PrimeVue components or the products it supports label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue contains a question about the use of PrimeVue components or the products it supports
Projects
None yet
Development

No branches or pull requests

2 participants