import{j as e}from"./index-bIIEL2MP.js";import{useMDXComponents as t}from"./index-CO-0pc0F.js";import{M as i}from"./index-Z-6k0Xrj.js";import{H as s}from"./HorizontalScroller.stories-BB6MtQQl.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./iframe-CzjIX-qr.js";import"./index-aQYXhgXp.js";import"./index-DrFu-skq.js";import"./props-b4vEeO_8.js";import"./runtime-C3rQLW--.js";import"./window-DXjFTZv5.js";import"./create-runtime-stories-7AWWVphH.js";import"./snippet-C5kbqVpq.js";import"./svelte-component-C8Ginrj8.js";import"./get-C3XmtPLd.js";import"./tweened-4Ja_XIbT.js";import"./index-client-BAw8T8-V.js";import"./actions-BHcvdwVC.js";import"./attributes-Cg6aLqN3.js";import"./style-DvJ3IcV1.js";import"./size-DMdj3-I9.js";import"./this-CrUBQEQ_.js";import"./each-CVpBMMjG.js";import"./BodyText-CXnxLnBi.js";import"./Markdown-DUxFwijc.js";import"./Block-D3Ui8rd-.js";import"./DatawrapperChart-BBvguXT3.js";import"./GraphicBlock-uLJTqaY1.js";import"./PaddingReset-_TGvg1_B.js";import"./Headline-C-tkYFZ6.js";import"./Byline-BhU2Zjcl.js";import"./index-CX1x869l.js";import"./journalize-K6hK94UL.js";import"./html-CPeakWmR.js";import"./ScrollerBase-DJMKplMV.js";const l=""+new URL("illustrator-CMBieaIY.png",import.meta.url).href;function r(o){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{of:s}),` `,e.jsx(n.h1,{id:"horizontalscroller",children:"HorizontalScroller"}),` `,e.jsxs(n.p,{children:["The ",e.jsx(n.code,{children:"HorizontalScroller"})," component creates a horizontal scrolling section that scrolls through any child content wider than ",e.jsx(n.code,{children:"100vw"}),"."]}),` `,e.jsxs(n.p,{children:["To use ",e.jsx(n.code,{children:"HorizontalScroller"}),", wrap it around the content that you want to horizontally scroll through. The scroll length is controlled by the height of the ",e.jsx(n.code,{children:"HorizontalScroller"})," container, which is set by the prop ",e.jsx(n.code,{children:"height"}),". ",e.jsx(n.code,{children:"height"})," defaults to ",e.jsx(n.code,{children:"200lvh"}),", but you can adjust this to any valid CSS height value such as ",e.jsx(n.code,{children:"1200px"})," or ",e.jsx(n.code,{children:"400lvh"}),"."]}),` `,e.jsxs(n.p,{children:["The child content inside the ",e.jsx(n.code,{children:"HorizontalScroller"})," must be wider than ",e.jsx(n.code,{children:"100vw"})," so that there is overflow to horizontal scroll through. By default, only the top ",e.jsx(n.code,{children:"100lvh"})," of the child content is visible. You can use CSS ",e.jsx(n.code,{children:"transform: translate()"})," on the child content to adjust its vertical positioning within the visible area."]}),` `,e.jsxs(n.blockquote,{children:[` `,e.jsxs(n.p,{children:["💡TIP: Use ",e.jsx(n.code,{children:"lvh"})," or ",e.jsx(n.code,{children:"svh"})," units instead of ",e.jsx(n.code,{children:"vh"})," unit for the height, as ",e.jsx(n.a,{href:"https://www.w3.org/TR/css-values-4/#large-viewport-size",rel:"nofollow",children:"these units"})," are more reliable on mobile or other devices where elements such as the address bar toggle between being shown and hidden."]}),` `]}),` `,e.jsxs(n.blockquote,{children:[` `,e.jsxs(n.p,{children:["💡TIP: Set the ",e.jsx(n.code,{children:"showDebugInfo"})," prop to ",e.jsx(n.code,{children:"true"})," to visualise the scroll progress and other useful information."]}),` `]}),` `,e.jsxs(n.p,{children:["See the full list of available props under the ",e.jsx(n.code,{children:"Controls"})," tab in the ",e.jsx(n.a,{href:"?path=/story/components-graphics-horizontalscroller--demo",children:"demo"}),"."]}),` `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-svelte",children:`