PageSourceSearch

https://touying-typ.github.io/assets/js/eea99fef.fa51e636.js

js touying-typ.github.io collected 2026-10-03 10:08:43 UTC 4,339 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6817],{59888:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>s});var a=t(85893),o=t(11151);const r={sidebar_position:2,description:"Lazy fractional horizontal space, the horizontal counterpart of lazy-v.",toc_max_heading_level:2},i="lazy-h",l={id:"reference/components/lazy-h",title:"lazy-h",description:"Lazy fractional horizontal space, the horizontal counterpart of lazy-v.",source:"@site/docs/reference/components/lazy-h.mdx",sourceDirName:"reference/components",slug:"/reference/components/lazy-h",permalink:"/docs/reference/components/lazy-h",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2,description:"Lazy fractional horizontal space, the horizontal counterpart of lazy-v.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"lazy-v",permalink:"/docs/reference/components/lazy-v"},next:{title:"lazy-layout",permalink:"/docs/reference/components/lazy-layout"}},c={},s=[{value:"amount : <TypeLink></TypeLink>",id:"amount",level:3},{value:"weak : <TypeLink></TypeLink> <Default><code>false</code></Default>",id:"weak",level:3}];function h(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,o.a)(),...e.components},{Default:t,Param:r,Parameters:i,Signature:l,SignatureName:c,SignatureParam:s,SourceLink:h,TypeLink:d}=n;return t||p("Default",!0),r||p("Param",!0),i||p("Parameters",!0),l||p("Signature",!0),c||p("SignatureName",!0),s||p("SignatureParam",!0),h||p("SourceLink",!0),d||p("TypeLink",!0),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"lazy-h",children:"lazy-h"}),"\n",(0,a.jsx)(l,{children:(0,a.jsxs)("code",{children:[(0,a.jsx)(c,{children:"lazy-h"}),"(",(0,a.jsxs)(s,{children:[(0,a.jsx)(n.a,{href:"#amount",children:"amount"}),", "]}),(0,a.jsx)(s,{children:(0,a.jsx)(n.a,{href:"#weak",children:"weak: false"})}),")",(0,a.jsx)(h,{href:"https://github.com/touying-typ/touying/blob/main/src/components.typ#L83"})]})}),"\n",(0,a.jsxs)(n.p,{children:["Lazy fractional horizontal space, the horizontal counterpart of ",(0,a.jsx)(n.code,{children:"lazy-v"}),".\nUsed with ",(0,a.jsx)(n.code,{children:"lazy-layout(direction: ltr)"})," to push content to the right edge of a\nblock while keeping sibling blocks at equal width without filling the entire page."]}),"\n",(0,a.jsxs)(n.p,{children:["Has no visual effect without a matching ",(0,a.jsx)(n.code,{children:"lazy-layout"}),". If a row contains multiple\n",(0,a.jsx)(n.code,{children:"lazy-h"})," markers (stacked blocks), only the last one is activated."]}),"\n",(0,a.jsx)(n.p,{children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typ",children:"#lazy-layout(\n  direction: ltr,\n  stack(\n    dir: ltr,\n    block(height: 100%)[\n      Left label. #lazy-h(1fr) Right label.\n    ],\n    block(height: 100%)[\n      A longer left label. #lazy-h(1fr) Right label.\n    ],\n  ),\n)\n"})}),"\n",(0,a.jsxs)(i,{children:[(0,a.jsxs)(n.h3,{id:"amount",children:["amount : ",(0,a.jsx)(d,{type:"fraction"})]}),(0,a.jsx)(r,{children:(0,a.jsxs)(n.p,{children:["The fractional amount of space (e.g. ",(0,a.jsx)(n.code,{children:"1fr"}),")."]})}),(0,a.jsxs)(n.h3,{id:"weak",children:["weak : ",(0,a.jsx)(d,{type:"bool"})," ",(0,a.jsx)(t,{children:(0,a.jsx)(n.code,{children:"false"})})]}),(0,a.jsx)(r,{children:(0,a.jsxs)(n.p,{children:["Whether the space is weak. Default is ",(0,a.jsx)(n.code,{children:"false"}),"."]})})]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Returns:"})," ",(0,a.jsx)(d,{type:"content"})]})]})}function d(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}function p(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},11151:(e,n,t)=>{t.d(n,{Z:()=>l,a:()=>i});var a=t(67294);const o={},r=a.createContext(o);function i(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.