-
Notifications
You must be signed in to change notification settings - Fork 602
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
Options to define prev/next buttons SVG #50
Comments
This could be a useful pro feature. Do you want to tweak the arrow shape (thinner stroke, wider angle) or are you looking to put in a completely different shape? |
For now I needed a thinner (like 1px) arrow and got bored of changing it in the js file. For basic users would be enough to be able to change the stroke's width, maybe the angle. But for a web designer might be important to be able to change it completely to their needs. |
i'd vote for having full control over the prev/next buttons - maybe passing an array that would contain html for the buttons content, like: prevNextButtons : [ '<b>prev</b>', '<em>next</em>' ] or even prevNextButtons : [ '', '' ]; // or `[]`? to have "empty" buttons, that one would style with css only |
I like #50 (comment). I normally compile all of my SVGs as a sprite that references symbold IDs, so being able to inline this would be great so I don't have to modify the color with CSS when needed using http://zslabs.com/articles/svg-background-fill/ |
+1! |
+1 |
should i prepare a PR for that, @desandro? |
+1 |
2 similar comments
+1 |
+1 |
Would love this also... what's the best way to hack in a custom SVG for now? |
+1 |
1 similar comment
+1 |
👍 Just saw the Demohttp://demo.tannerhodges.com/flickity/sandbox/arrow-shape.html Getting StartedFor others who want to get started now, here's what I did:
git clone git@github.com:metafizzy/flickity.git
cd flickity
npm install
bower install
gulp
...
<path class="st0" d="M62.5 0l3.6 2.1L38.7 50l27.4 47.9-3.6 2.1-28.6-50L62.5 0z"/>
...
new Flickity( '.myFlickityCarousel', {
arrowShape: 'M62.5 0l3.6 2.1L38.7 50l27.4 47.9-3.6 2.1-28.6-50L62.5 0z'
}); Other Notes
Excited to see this get released! |
@tannerhodges Thanks for taking a look. Yup, this will land in the next release. It's still in development. I'm still putting together docs. I'll follow up when it's showtime. |
Flickity v1.1 released with
|
👍 |
I was too excited implementing this to respond yesterday — bravo! Thanks @desandro, really appreciate it. |
Is there a tool to generate the arrowShape string? (arrowShape: 'M 0,50 L 60,00 L 50,30 L 80,30 L 80,70 L 50,70 L 60,100 Z') |
@simply-simpy Most common way would be to use a vector file:
|
Are there any plans to allow usage of an xlink:href for the SVG so we could use a symbol from an existing sprite? I guess that would probably end up working similarly to #50 (comment) |
@mdmoreau Sorry, nope. |
@desandro I really think the use of sprites should be rethought. Currently working on a project with sprites as per https://css-tricks.com/svg-use-with-external-reference-take-2/. Would be really handy to make it work with Flickity. |
Is there any way of adding HTML for prev and next ? |
I had issues with that too, solved by mocking up arrow in illustrator and copying the location to all my vector-points.
…Sent from my iPhone
On Jan 15, 2017, at 1:32 PM, designifyer ***@***.***> wrote:
Is there any way of adding HTML for prev and next ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@designifyer You can hook up your own buttons in HTML. See custom navigation UI |
@desandro Got it. Thank you! |
Am I missing an option where I can just assign a custom PNG as an arrow? |
I believe you would need to write the CSS yourself.
… On Jul 14, 2017, at 8:57 AM, Paul M. Zahorosky ***@***.***> wrote:
Am I missing an option where I can just assign a custom PNG as an arrow?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#50 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAkNZK6SclaMOx1rbwdpQPNPefQD4Ol4ks5sN4_VgaJpZM4DgLSQ>.
|
I tried that- targeting the |
I've done it before, you may want to drop a question on Stack Overflow.
…Sent from my iPhone
On Jul 14, 2017, at 9:52 AM, Paul M. Zahorosky ***@***.***> wrote:
I tried that- targeting the .flickity-prev-next-button.previous and .flickity-prev-next-button.next and attempting to add a background image- no go.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi there! What if you have two different paths in your arrow svg? I understand I can combine them, but I'd like to keep them separate for animation purposes. |
@nettymaza If you want custom buttons that you can animate separately, then you can build your own navigation buttons that hook into Flickity's API. See Custom navigation UI |
Has anyone tried using Font Awesome Icons with this method? I am trying to do it with their left arrow icon and I get just get an empty circle. :( |
You can try this |
I think it's a chevron, not an arrow. |
Please add this to the docs: Arrow needs to be 100px x 100px |
Would be nice to have an option to define the prev/next button svg code. For example:
The text was updated successfully, but these errors were encountered: