-
Notifications
You must be signed in to change notification settings - Fork 171
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
customize the nav arrows #17
Comments
You can pass your own navigation arrows, whether an SVG, FontIcon or even a normal text. Check the example below: <carousel>
...
<template #addons>
<navigation>
<template #next>
<span> >> </span>
</template>
<template #prev>
<span> << </span>
</template>
</navigation>
</template>
</carousel> |
You can overwrite the default CSS style, however, if you don't want the navigations arrows at all, don't add the |
I tried overwriting the css, and unless I get into the npm package i can't
seem to. I do want the navigation arrows, just not the purple background.
…On Sat, Feb 27, 2021 at 9:47 AM Abdelrahman Ismail ***@***.***> wrote:
You can overwrite the default CSS style, however, if you don't want the
navigations arrows at all, don't add the <navigation> addon
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACDHQIUAYDPBIW2L7METK7DTBEAY5ANCNFSM4XGPNDUQ>
.
|
All classes are exposed using the BEM naming convention, so you can easily overwrite then for example: .carousel__prev,
.carousel__next {
border: 5px solid white;
background-color: red;
} You can also overwrite the carouse primary color CSS variable value to achieve this: :root {
--carousel-color-primary: red;
} Please make sure you are using the latest version, and If this doesn't work with you, could you please provide me we a working example snippet? |
I got it, I had to put the css for it all the way on the parent component
to waterfall down
…On Sat, Feb 27, 2021 at 1:49 PM Abdelrahman Ismail ***@***.***> wrote:
All classes are exposed using the BEM naming convention, so you can easily
overwrite then for example:
.carousel__prev,
.carousel__next {
border: 5px solid white;
background-color: red;
}
You can also overwrite the carouse primary color CSS variable value to
achieve this:
:root {
--carousel-color-primary: red;
}
Please make sure you are using the latest version, and If this doesn't
work with you, could you please provide me we a working example snippet?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACDHQISU4FYEEPVFZASBVGTTBE5DVANCNFSM4XGPNDUQ>
.
|
Great! |
Can you please specify what do you mean by the parent component. I am having difficulty achieving exactly what you did.
So I have plan cards which I want to start with the same top line. I don't seem to be able to achieve this. |
This thread was super useful for figuring out how to change the color of the arrows so thank you for asking @DBereznak ! I also wanted to note that you have to make sure your style tag is unscoped when you set the color of the arrows. |
why it didn't work on my project, i tried to override styling to change navigation color but it was still unsuccessfull |
@ahmadwaluyo Please refer to this file to know which CSS variables are available for the carusel |
i've fixed it by overrided it with new class: .carousel__prev, then, could you please tell me how to override style in pagination |
Check this sandbox for example on how to use the carousel CSS Variables |
i understand right now, it's because i made my style into scoped so
overriding class would not work properly. When i set my style not in scoped
mode its work !
alright thank you for your help 👍
Pada tanggal Sab, 26 Mar 2022 pukul 15.55 Abdelrahman Ismail <
***@***.***> menulis:
… Check this sandbox
<https://codesandbox.io/s/vue3-carousel-custom-colors-0wqztz?file=/src/App.vue>
for example on how to use the carousel CSS Variables
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALMOSRSNTJAQGHYAVBWMDYTVB3GHJANCNFSM4XGPNDUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I want to apply +1 to data=0 when I press next and -1 when I press prev. How can I customize it? |
@IHAGI-c The easiest way is to create your custom navigation and make it do whatever you want. Check this example: https://ismail9k.github.io/vue3-carousel/examples.html#custom-navigation |
So If You want to modify Vue3 carousel navigation to custom view. There is 3 easy steps:
Modifying of initial main css file did not gave me any results but new one - worked well! |
I was just curious if it was possible to customize the nav arrows. I tried targeting the css selector class and the button with no success. I know I can go into the npm module and update it there, but that is inefficient, because if do a fresh npm install I will lose the change.
The text was updated successfully, but these errors were encountered: