News
Behind The Name | Moloā Slipper
Behind The Name | Moloā Slipper
Kumu Kamuela Yim letʻs us know the Moloā Slipper is not just slippers for home – itʻs a state of mind.
Shop The Story
{"id":5156388176007,
"handle":"moloa-mens-leather-slippers-dark-wood",
"title":"Moloā Slipper - Dark Wood",
"available":true,
"tags":["arch:high","arch:standard","best sellers","best selling","best:cold_climate","best:indoor","cat:slippers","CM2025","Cold Climate","collection:cart-upsell","collection:comfort-seeker","collection:HGG-Slider-M","collection:wfh","color:brown","color:Dark Wood","drop-in heel®","fit:wide","free shipping","gender:men","high arch slippers","high arch slippers men","homebody","Indoor","interest:driving","leather","likes:relaxing","maloa","material:leather","men","mens","menslippers","Menslppers","mensslippers","mensslper","men’s","milia slipper","mo loa","moala","moloa","moloa liper","moloa moccasin","moloa slipper","moloamoa","prime","RGroup_10252","s ippers","shearling lined","sheepskin","sherling","size:true","slippers","split_color","style:10252","vacation:road-trip","YGroup_10252"],
"type":"Men’s Premium Leather Slippers",
"options_with_values": [{"name":"Color","position":1,"values":["Dark Wood"]},{"name":"Size","position":2,"values":["7","8","9","10","11","12","13","14","15","16"]}],
"price":18000,
"price_min":18000,
"price_max":18000,
"compare_at_price":null,"featured_image": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_001_M_MOLOA_SLIPPER_DKWDKW_5aa0f439-bcf4-426c-b9a1-ce1e4ca3b6c0.png?v=1759861403",
"featured_image_aspect_ratio": 1.0,
"featured_image_width": 2000,
"featured_image_height": 2000,
"featured_image_id": 36465007886471,
"featured_image_alt": "Moloā Slipper - Dark Wood",
"hover_image": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_102_39ed68b2-19da-4cfb-91c3-4f8f6949049c.jpg?v=1761169470",
"hover_image_alt": "Moloā Slipper - Dark Wood",
"images": [{
"id": 36465007886471,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_001_M_MOLOA_SLIPPER_DKWDKW_5aa0f439-bcf4-426c-b9a1-ce1e4ca3b6c0.png?v=1759861403",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 36625231708295,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_102_39ed68b2-19da-4cfb-91c3-4f8f6949049c.jpg?v=1761169470",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 46794106372231,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363-DARKWOOD_2a5781e5-2a25-46b9-98cb-25d7ece95575.jpg?v=1789592097",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 46794071572615,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/11.webp?v=1789591352",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 36465008083079,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_201_1178956f-f316-4b0a-95c5-868c7c982318.jpg?v=1761169323",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2002
},{
"id": 36465009328263,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_103_M_MoloaSlipper_DkwDkw_bc41d48a-5c86-4e2d-a077-13d881529ad7.jpg?v=1761169470",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 36625226072199,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_102_M_MoloaSlipper_DkwDkw.png?v=1761169470",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 46794106536071,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252-6363-004.png?v=1789592121",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 36465009655943,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_6363_005_M_MoloaSlipper_DkwDkw.png?v=1761169470",
"alt": "Moloā Slipper - Dark Wood",
"width": 2000,
"height": 2000
}],
"plp_image_order_positions": "",
"sku": "10252-6363-7"
}
{ $dispatch('product-item:images-changed', { product: product, source: 'swatch-container' }) })"
@pointercancel="intendedSwatchIndex = null; intendedSwatchEl = null"
x-data="{
wrapper: $el,
selectedSibling:product.siblings[0],
intendedSwatchIndex: null,
intendedSwatchEl: null,
swatchGap: 8,
scrollable: product.siblings.filter(s => !!s.available).length > 9.5,
canPrev: false,
canNext: true,
_edgeReady: false,
imageLimit: 0,
limitImages(nextProduct) {
const images = Array.isArray(nextProduct && nextProduct.images) ? nextProduct.images : [];
const limitedImages = this.imageLimit > 0 ? images.slice(0, this.imageLimit) : images;
const hoverImage = limitedImages[1] || null;
return Object.assign({}, nextProduct, {
images: limitedImages,
hover_image: hoverImage ? hoverImage.src : null,
hover_image_alt: hoverImage ? hoverImage.alt : null
});
},
selectProduct(nextProduct) {
const productRoot = $el.closest('.product-item');
const productData = productRoot && productRoot._x_dataStack && productRoot._x_dataStack[0];
if (productData && typeof productData.setProduct === 'function') {
productData.setProduct(nextProduct);
} else {
$data.product = this.limitImages(nextProduct);
}
},
getSwatchImageSrc(sibling) {
return sibling.images[0].src;
},
buildSwatchSrcset(src) {
if (!src) return '';
const widths = ['48', '96', '192'];
const separator = src.includes('?') ? '&' : '?';
return widths.map(w => `${src}${separator}width=${w} ${w}w`).join(', ');
},
isSwatchPriority(index) {
return window.innerWidth >= 1024 ? index < 3 : index < 2;
},
swatchBg(sibling) {
// swatch_bg precomputed at hydration. Nullish (not ||): null = no colors set
// (fall back to theme default), empty string = invalid combo, no fallback.
return sibling.swatch_bg ?? '#000000';
},
centerSwatch(el) {
if ($data.wrapper.scrollWidth <= $data.wrapper.clientWidth) return false
const wrapperRect = $data.wrapper.getBoundingClientRect()
const elRect = el.getBoundingClientRect()
const centerPoint = wrapperRect.x + (wrapperRect.width / 2)
const behavior = window.innerWidth < 1024 ? 'auto' : 'smooth'
$data.wrapper.scrollTo({
left: $data.wrapper.scrollLeft + (elRect.x - centerPoint + (elRect.width / 2)),
behavior
})
},
selectSwatchFromTap(siblingIndex, el) {
const idx = (this.intendedSwatchIndex !== null && this.intendedSwatchIndex !== undefined)
? this.intendedSwatchIndex
: siblingIndex
const targetEl = this.intendedSwatchEl || el
this.intendedSwatchIndex = null
this.intendedSwatchEl = null
const next = product.siblings[idx]
if (next) product = next
this.centerSwatch(targetEl)
},
scroll(direction = 'forward') {
const swatch = $data.wrapper.querySelector('.product-item__swatch')
const unit = swatch ? swatch.offsetWidth + $data.swatchGap : $data.wrapper.clientWidth * 0.3
let amount = 2 * unit
$data.wrapper.scrollTo({
left: direction == 'forward' ? $data.wrapper.scrollLeft + amount : $data.wrapper.scrollLeft - amount,
behavior:'smooth'
})
},
// Lazily wire the prev/next edge detection on first desktop hover/focus —
// the arrows are a desktop affordance, so no observer is built at load and
// none is ever built on mobile. canPrev/canNext default to the at-start state.
initSwatchEdges() {
if (this._edgeReady || window.innerWidth <= 1023) return
this._edgeReady = true
const root = this.wrapper
const swatches = root.querySelectorAll('.product-item__swatch')
if (swatches.length < 2) return
const first = swatches[0], last = swatches[swatches.length - 1]
const io = new IntersectionObserver((entries) => {
const d = window.Alpine && window.Alpine.$data ? window.Alpine.$data(root) : null
if (!d) return
entries.forEach((e) => {
if (e.target === first) d.canPrev = !e.isIntersecting
if (e.target === last) d.canNext = !e.isIntersecting
})
}, { root, threshold: 0.99 })
io.observe(first)
io.observe(last)
root._swatchEdgeIO = io
}
}"
@pointerenter="initSwatchEdges()"
@focusin="initSwatchEdges()"
>
{"id":5156388012167,
"handle":"moloa-mens-leather-slippers-toffee-dark-wood",
"title":"Moloā Slipper - Toffee \/ Dark Wood",
"available":true,
"tags":["2024-gift-guide","arch:high","arch:standard","bedroom shoes","best seller","best sellers","best selling","best:cold_climate","best:indoor","cat:slippers","Cold Climate","collection:comfort-seeker","collection:wfh","color:brown","color:Toffee \/ Dark Wood","drop-in heel®","fit:wide","free shipping","gender:men","high arch slippers","high arch slippers men","homebody","Indoor","interest:driving","leather","likes:relaxing","maloa","material:leather","men","mens","menslippers","Menslppers","mensslper","men’s","milia slipper","mo loa","moala","moloa","moloa liper","moloa moccasin","moloa slipper","moloā toffee darkwood","prime","RGroup_10252","s ippers","shearling lined","sheepskin","size:true","slippers","split_color","style:10252","trending","vacation:road-trip","YGroup_10252"],
"type":"Men’s Premium Leather Slippers",
"options_with_values": [{"name":"Color","position":1,"values":["Toffee \/ Dark Wood"]},{"name":"Size","position":2,"values":["7","8","9","10","11","12","13","14","15","16"]}],
"price":18000,
"price_min":18000,
"price_max":18000,
"compare_at_price":null,"featured_image": "\/\/olukai.ca\/cdn\/shop\/files\/10252_3363_001_M_MoloaSlipper_TofDkw_5a23ba0e-a829-4e6a-96c5-2d296000716e.png?v=1759861402",
"featured_image_aspect_ratio": 1.0,
"featured_image_width": 2000,
"featured_image_height": 2000,
"featured_image_id": 36465007820935,
"featured_image_alt": "Toffee \/ Dark Wood",
"hover_image": "\/\/olukai.ca\/cdn\/shop\/files\/10252-3363-203_558b8c19-d847-4aff-9eaf-6d3bc1ac413a.jpg?v=1761168488",
"hover_image_alt": "Moloā Slipper - Toffee \/ Dark Wood",
"images": [{
"id": 36465007820935,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_3363_001_M_MoloaSlipper_TofDkw_5a23ba0e-a829-4e6a-96c5-2d296000716e.png?v=1759861402",
"alt": "Toffee \/ Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 36625178853511,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252-3363-203_558b8c19-d847-4aff-9eaf-6d3bc1ac413a.jpg?v=1761168488",
"alt": "Moloā Slipper - Toffee \/ Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 46794099523719,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_3363-TOFFEE-DARKWOOD_58ba1546-fe0f-4480-aad7-2f4928c285b1.jpg?v=1789591906",
"alt": "Moloā Slipper - Toffee \/ Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 46794071343239,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/1.webp?v=1789591306",
"alt": "Moloā Slipper - Toffee \/ Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 46794102014087,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/DSF9349-updated.jpg?v=1789591938",
"alt": "Moloā Slipper - Toffee \/ Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 46794103390343,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252-3363-004.png?v=1789591962",
"alt": "Moloā Slipper - Toffee \/ Dark Wood",
"width": 2000,
"height": 2000
},{
"id": 36465009295495,
"src": "\/\/olukai.ca\/cdn\/shop\/files\/10252_3363_005_M_MoloaSlipper_TofDkw.png?v=1761168488",
"alt": "Toffee \/ Dark Wood",
"width": 2000,
"height": 2000
}],
"plp_image_order_positions": "",
"sku": "10252-3363-8"
}
{ $dispatch('product-item:images-changed', { product: product, source: 'swatch-container' }) })"
@pointercancel="intendedSwatchIndex = null; intendedSwatchEl = null"
x-data="{
wrapper: $el,
selectedSibling:product.siblings[0],
intendedSwatchIndex: null,
intendedSwatchEl: null,
swatchGap: 8,
scrollable: product.siblings.filter(s => !!s.available).length > 9.5,
canPrev: false,
canNext: true,
_edgeReady: false,
imageLimit: 0,
limitImages(nextProduct) {
const images = Array.isArray(nextProduct && nextProduct.images) ? nextProduct.images : [];
const limitedImages = this.imageLimit > 0 ? images.slice(0, this.imageLimit) : images;
const hoverImage = limitedImages[1] || null;
return Object.assign({}, nextProduct, {
images: limitedImages,
hover_image: hoverImage ? hoverImage.src : null,
hover_image_alt: hoverImage ? hoverImage.alt : null
});
},
selectProduct(nextProduct) {
const productRoot = $el.closest('.product-item');
const productData = productRoot && productRoot._x_dataStack && productRoot._x_dataStack[0];
if (productData && typeof productData.setProduct === 'function') {
productData.setProduct(nextProduct);
} else {
$data.product = this.limitImages(nextProduct);
}
},
getSwatchImageSrc(sibling) {
return sibling.images[0].src;
},
buildSwatchSrcset(src) {
if (!src) return '';
const widths = ['48', '96', '192'];
const separator = src.includes('?') ? '&' : '?';
return widths.map(w => `${src}${separator}width=${w} ${w}w`).join(', ');
},
isSwatchPriority(index) {
return window.innerWidth >= 1024 ? index < 3 : index < 2;
},
swatchBg(sibling) {
// swatch_bg precomputed at hydration. Nullish (not ||): null = no colors set
// (fall back to theme default), empty string = invalid combo, no fallback.
return sibling.swatch_bg ?? '#000000';
},
centerSwatch(el) {
if ($data.wrapper.scrollWidth <= $data.wrapper.clientWidth) return false
const wrapperRect = $data.wrapper.getBoundingClientRect()
const elRect = el.getBoundingClientRect()
const centerPoint = wrapperRect.x + (wrapperRect.width / 2)
const behavior = window.innerWidth < 1024 ? 'auto' : 'smooth'
$data.wrapper.scrollTo({
left: $data.wrapper.scrollLeft + (elRect.x - centerPoint + (elRect.width / 2)),
behavior
})
},
selectSwatchFromTap(siblingIndex, el) {
const idx = (this.intendedSwatchIndex !== null && this.intendedSwatchIndex !== undefined)
? this.intendedSwatchIndex
: siblingIndex
const targetEl = this.intendedSwatchEl || el
this.intendedSwatchIndex = null
this.intendedSwatchEl = null
const next = product.siblings[idx]
if (next) product = next
this.centerSwatch(targetEl)
},
scroll(direction = 'forward') {
const swatch = $data.wrapper.querySelector('.product-item__swatch')
const unit = swatch ? swatch.offsetWidth + $data.swatchGap : $data.wrapper.clientWidth * 0.3
let amount = 2 * unit
$data.wrapper.scrollTo({
left: direction == 'forward' ? $data.wrapper.scrollLeft + amount : $data.wrapper.scrollLeft - amount,
behavior:'smooth'
})
},
// Lazily wire the prev/next edge detection on first desktop hover/focus —
// the arrows are a desktop affordance, so no observer is built at load and
// none is ever built on mobile. canPrev/canNext default to the at-start state.
initSwatchEdges() {
if (this._edgeReady || window.innerWidth <= 1023) return
this._edgeReady = true
const root = this.wrapper
const swatches = root.querySelectorAll('.product-item__swatch')
if (swatches.length < 2) return
const first = swatches[0], last = swatches[swatches.length - 1]
const io = new IntersectionObserver((entries) => {
const d = window.Alpine && window.Alpine.$data ? window.Alpine.$data(root) : null
if (!d) return
entries.forEach((e) => {
if (e.target === first) d.canPrev = !e.isIntersecting
if (e.target === last) d.canNext = !e.isIntersecting
})
}, { root, threshold: 0.99 })
io.observe(first)
io.observe(last)
root._swatchEdgeIO = io
}
}"
@pointerenter="initSwatchEdges()"
@focusin="initSwatchEdges()"
>
{ $dispatch('product-item:images-changed', { product: product, source: 'swatch-container' }) })"
@pointercancel="intendedSwatchIndex = null; intendedSwatchEl = null"
x-data="{
wrapper: $el,
selectedSibling:product.siblings[0],
intendedSwatchIndex: null,
intendedSwatchEl: null,
swatchGap: 8,
scrollable: product.siblings.filter(s => !!s.available).length > 9.5,
canPrev: false,
canNext: true,
_edgeReady: false,
imageLimit: 0,
limitImages(nextProduct) {
const images = Array.isArray(nextProduct && nextProduct.images) ? nextProduct.images : [];
const limitedImages = this.imageLimit > 0 ? images.slice(0, this.imageLimit) : images;
const hoverImage = limitedImages[1] || null;
return Object.assign({}, nextProduct, {
images: limitedImages,
hover_image: hoverImage ? hoverImage.src : null,
hover_image_alt: hoverImage ? hoverImage.alt : null
});
},
selectProduct(nextProduct) {
const productRoot = $el.closest('.product-item');
const productData = productRoot && productRoot._x_dataStack && productRoot._x_dataStack[0];
if (productData && typeof productData.setProduct === 'function') {
productData.setProduct(nextProduct);
} else {
$data.product = this.limitImages(nextProduct);
}
},
getSwatchImageSrc(sibling) {
return sibling.images[0].src;
},
buildSwatchSrcset(src) {
if (!src) return '';
const widths = ['48', '96', '192'];
const separator = src.includes('?') ? '&' : '?';
return widths.map(w => `${src}${separator}width=${w} ${w}w`).join(', ');
},
isSwatchPriority(index) {
return window.innerWidth >= 1024 ? index < 3 : index < 2;
},
swatchBg(sibling) {
// swatch_bg precomputed at hydration. Nullish (not ||): null = no colors set
// (fall back to theme default), empty string = invalid combo, no fallback.
return sibling.swatch_bg ?? '#000000';
},
centerSwatch(el) {
if ($data.wrapper.scrollWidth <= $data.wrapper.clientWidth) return false
const wrapperRect = $data.wrapper.getBoundingClientRect()
const elRect = el.getBoundingClientRect()
const centerPoint = wrapperRect.x + (wrapperRect.width / 2)
const behavior = window.innerWidth < 1024 ? 'auto' : 'smooth'
$data.wrapper.scrollTo({
left: $data.wrapper.scrollLeft + (elRect.x - centerPoint + (elRect.width / 2)),
behavior
})
},
selectSwatchFromTap(siblingIndex, el) {
const idx = (this.intendedSwatchIndex !== null && this.intendedSwatchIndex !== undefined)
? this.intendedSwatchIndex
: siblingIndex
const targetEl = this.intendedSwatchEl || el
this.intendedSwatchIndex = null
this.intendedSwatchEl = null
const next = product.siblings[idx]
if (next) product = next
this.centerSwatch(targetEl)
},
scroll(direction = 'forward') {
const swatch = $data.wrapper.querySelector('.product-item__swatch')
const unit = swatch ? swatch.offsetWidth + $data.swatchGap : $data.wrapper.clientWidth * 0.3
let amount = 2 * unit
$data.wrapper.scrollTo({
left: direction == 'forward' ? $data.wrapper.scrollLeft + amount : $data.wrapper.scrollLeft - amount,
behavior:'smooth'
})
},
// Lazily wire the prev/next edge detection on first desktop hover/focus —
// the arrows are a desktop affordance, so no observer is built at load and
// none is ever built on mobile. canPrev/canNext default to the at-start state.
initSwatchEdges() {
if (this._edgeReady || window.innerWidth <= 1023) return
this._edgeReady = true
const root = this.wrapper
const swatches = root.querySelectorAll('.product-item__swatch')
if (swatches.length < 2) return
const first = swatches[0], last = swatches[swatches.length - 1]
const io = new IntersectionObserver((entries) => {
const d = window.Alpine && window.Alpine.$data ? window.Alpine.$data(root) : null
if (!d) return
entries.forEach((e) => {
if (e.target === first) d.canPrev = !e.isIntersecting
if (e.target === last) d.canNext = !e.isIntersecting
})
}, { root, threshold: 0.99 })
io.observe(first)
io.observe(last)
root._swatchEdgeIO = io
}
}"
@pointerenter="initSwatchEdges()"
@focusin="initSwatchEdges()"
>
Explore Similar Stories
{ $dispatch('product-item:images-changed', { product: product, source: 'swatch-container' }) })"
@pointercancel="intendedSwatchIndex = null; intendedSwatchEl = null"
x-data="{
wrapper: $el,
selectedSibling:product.siblings[0],
intendedSwatchIndex: null,
intendedSwatchEl: null,
swatchGap: 8,
scrollable: product.siblings.filter(s => !!s.available).length > 9.5,
canPrev: false,
canNext: true,
_edgeReady: false,
imageLimit: 0,
limitImages(nextProduct) {
const images = Array.isArray(nextProduct && nextProduct.images) ? nextProduct.images : [];
const limitedImages = this.imageLimit > 0 ? images.slice(0, this.imageLimit) : images;
const hoverImage = limitedImages[1] || null;
return Object.assign({}, nextProduct, {
images: limitedImages,
hover_image: hoverImage ? hoverImage.src : null,
hover_image_alt: hoverImage ? hoverImage.alt : null
});
},
selectProduct(nextProduct) {
const productRoot = $el.closest('.product-item');
const productData = productRoot && productRoot._x_dataStack && productRoot._x_dataStack[0];
if (productData && typeof productData.setProduct === 'function') {
productData.setProduct(nextProduct);
} else {
$data.product = this.limitImages(nextProduct);
}
},
getSwatchImageSrc(sibling) {
return sibling.images[0].src;
},
buildSwatchSrcset(src) {
if (!src) return '';
const widths = ['48', '96', '192'];
const separator = src.includes('?') ? '&' : '?';
return widths.map(w => `${src}${separator}width=${w} ${w}w`).join(', ');
},
isSwatchPriority(index) {
return window.innerWidth >= 1024 ? index < 3 : index < 2;
},
swatchBg(sibling) {
// swatch_bg precomputed at hydration. Nullish (not ||): null = no colors set
// (fall back to theme default), empty string = invalid combo, no fallback.
return sibling.swatch_bg ?? '#000000';
},
centerSwatch(el) {
if ($data.wrapper.scrollWidth <= $data.wrapper.clientWidth) return false
const wrapperRect = $data.wrapper.getBoundingClientRect()
const elRect = el.getBoundingClientRect()
const centerPoint = wrapperRect.x + (wrapperRect.width / 2)
const behavior = window.innerWidth < 1024 ? 'auto' : 'smooth'
$data.wrapper.scrollTo({
left: $data.wrapper.scrollLeft + (elRect.x - centerPoint + (elRect.width / 2)),
behavior
})
},
selectSwatchFromTap(siblingIndex, el) {
const idx = (this.intendedSwatchIndex !== null && this.intendedSwatchIndex !== undefined)
? this.intendedSwatchIndex
: siblingIndex
const targetEl = this.intendedSwatchEl || el
this.intendedSwatchIndex = null
this.intendedSwatchEl = null
const next = product.siblings[idx]
if (next) product = next
this.centerSwatch(targetEl)
},
scroll(direction = 'forward') {
const swatch = $data.wrapper.querySelector('.product-item__swatch')
const unit = swatch ? swatch.offsetWidth + $data.swatchGap : $data.wrapper.clientWidth * 0.3
let amount = 2 * unit
$data.wrapper.scrollTo({
left: direction == 'forward' ? $data.wrapper.scrollLeft + amount : $data.wrapper.scrollLeft - amount,
behavior:'smooth'
})
},
// Lazily wire the prev/next edge detection on first desktop hover/focus —
// the arrows are a desktop affordance, so no observer is built at load and
// none is ever built on mobile. canPrev/canNext default to the at-start state.
initSwatchEdges() {
if (this._edgeReady || window.innerWidth <= 1023) return
this._edgeReady = true
const root = this.wrapper
const swatches = root.querySelectorAll('.product-item__swatch')
if (swatches.length < 2) return
const first = swatches[0], last = swatches[swatches.length - 1]
const io = new IntersectionObserver((entries) => {
const d = window.Alpine && window.Alpine.$data ? window.Alpine.$data(root) : null
if (!d) return
entries.forEach((e) => {
if (e.target === first) d.canPrev = !e.isIntersecting
if (e.target === last) d.canNext = !e.isIntersecting
})
}, { root, threshold: 0.99 })
io.observe(first)
io.observe(last)
root._swatchEdgeIO = io
}
}"
@pointerenter="initSwatchEdges()"
@focusin="initSwatchEdges()"
>