Brands Carousel
Documentation: Brands Carousel Component
Overview
Model Documentation
model
object that defines its behavior and appearance. Here's a detailed look at the model properties:Model Structure
model
object contains the following properties:String
The unique identifier for the component, used for styling and referencing the component.
String
Optional CSS class(es) for styling the outer container of the carousel. Allows for custom styling.
String
Optional header text to display above the carousel. This is rendered as an
<h2>
element.Number
Defines the alignment of the header text. Possible values are:
1
: Left aligned (justify-content-start
)2
: Center aligned (justify-content-center
)3
: Right aligned (justify-content-end
)Array
An array of brand IDs used to fetch the brand data.
Example Model
model
object might look like:{
"id": "brands-carousel-1",
"cssClass": "custom-carousel",
"header": "Our Trusted Brands",
"alignment": 2,
"brandIds": ["brand1", "brand2", "brand3", "brand4", "brand5"]
}
Component Structure
1.
2.
HTML Template
JavaScript
Steps to Create Your Own Brands Carousel Component
1.
Vue.component()
or app.component()
.template
option.2.
v-if
, v-for
, :class
, etc.) to bind data and control rendering.3.
props
to receive the model data from parent components.data()
to initialize component state.mounted()
to fetch brand data based on brandIds
.4.
5.
6.