-
Notifications
You must be signed in to change notification settings - Fork 0
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
Blocks carousel #9
Comments
You have successfully completed this step!Go to the next step! |
Oopsie, something went wrong 😿Results✅✅❌✅❌ Tests✅ Getting the files Try again 😁 |
2 similar comments
Oopsie, something went wrong 😿Results✅✅❌✅❌ Tests✅ Getting the files Try again 😁 |
Oopsie, something went wrong 😿Results✅✅❌✅❌ Tests✅ Getting the files Try again 😁 |
Oopsie, something went wrong 😿Results✅✅✅✅❌ Tests✅ Getting the files Try again 😁 |
1 similar comment
Oopsie, something went wrong 😿Results✅✅✅✅❌ Tests✅ Getting the files Try again 😁 |
You did great! 😁Results✅✅✅✅✅ Tests✅ Getting the files |
Blocks Carousel
✨ Branch: slider
Introduction
The Slider Layout, just as the Flex Layout, is a flexible way of creating a new block based on other blocks, using
children
. It allows slider from other blocks to be created, such asinfo-card
and evenflex-layout
, for example.Let's use the Slider Layout to transform a couple of info-cards into a slide.
Slider Layout
Looking at the documentation, we notice that we can use any block array as
children
, just as with Flex Layout.Below, you have an implementation example of a slider-layout with two
info-card
:Activity
In this activity, we will create a brand slider for our site:
In
home.jsonc
, declare theslider-layout#home
block to thestore.home
template.Create a file called
slider-layout.jsonc
in the/store/blocks
folder;In this file, based on the above-mentioned code, replace the declared
info-card
asslider-layout#home
's children and add 6image
image components as children. As format, useimage#brand1
,image#brand2
(...)image#brand6
to declare the components;Declare a specific
src
prop for each definedimage#brand
. Use the URLs below for each:https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square1.png
https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square2.png
https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square3.png
https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square4.png
https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square5.png
https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square6.png
Lastly, you have to use the
autoplay
property in theslider-layout#home
block. Make the slider occur automatically every 7 seconds and also make it stop when the user hovers over the slide.ℹ️ Remember to go through the Slider Layout and Image documentation if you have any questions during the activity.
🚫 Are you lost?
Is there any problem with this step? What about sending us a feedback? 🙏
Submit feedback
If you're still unsure as to how to send your answers, click here.
The text was updated successfully, but these errors were encountered: