[{"data":1,"prerenderedAt":1326},["ShallowReactive",2],{"writing":3,"components":19,"work":53,"\u002Fcomponents\u002Fswipe-actions":210},[4,13],{"title":5,"path":6,"description":7,"date":8,"book":9},"The book I wish I read sooner","\u002Fwriting\u002Fthe-book-i-wish-i-read-sooner","Atomic Habits, and why the smallest steps are the ones that change you.","2025-09-10",{"title":10,"author":11,"url":12},"Atomic Habits","James Clear","https:\u002F\u002Fjamesclear.com\u002Fatomic-habits",{"title":14,"path":15,"description":16,"date":17,"book":18},"Hello, world","\u002Fwriting\u002Fhello-world","A new home for the things I build and the small details I care about.","2025-09-09",null,[20,29,38,45],{"title":21,"path":22,"description":23,"tag":24,"icon":25,"new":26,"stem":27,"order":28},"Khmer Keyboard","\u002Fcomponents\u002Fkhmer-keyboard","An on-screen Khmer keyboard that lights up the next key.","input","i-f7-keyboard",true,"components\u002Fkhmer-keyboard",1,{"title":30,"path":31,"description":32,"tag":33,"icon":34,"new":35,"stem":36,"order":37},"Swipe Actions","\u002Fcomponents\u002Fswipe-actions","Swipe a row to reveal actions, like in a phone's mail app.","gesture","i-f7-hand-draw",false,"components\u002Fswipe-actions",2,{"title":39,"path":40,"description":41,"tag":33,"icon":42,"new":35,"stem":43,"order":44},"Card Carousel","\u002Fcomponents\u002Fcard-carousel","Swipe through cards, then open one into a full page.","i-f7-rectangle-stack","components\u002Fcard-carousel",3,{"title":46,"path":47,"description":48,"tag":49,"icon":50,"new":35,"stem":51,"order":52},"KHQR","\u002Fcomponents\u002Fkhqr","A payment card for Cambodia's KHQR, with paid, expired and failed states.","payment","i-f7-qrcode","components\u002Fkhqr",4,[54,86,102,124,142,157,175,192],{"title":55,"path":56,"description":57,"kind":58,"order":28,"status":59,"logo":60,"icon":18,"url":61,"features":62},"Aksar","\u002Fwork\u002Faksar","Free Khmer fonts for the web, with a keyboard and a poster maker.","product","live","\u002Flogos\u002Faksar.svg","https:\u002F\u002Faksar.sothearo.dev",[63,67,70,74,78,82],{"title":64,"text":65,"icon":66},"Every free Khmer font","34 fonts from Google Fonts, Inter Khmer, Khmer Digital, Busra and more, each with its license in plain words.","i-f7-textformat",{"title":68,"text":69,"icon":25},"Try your own words","Type in the font you're looking at, with an on-screen Khmer keyboard that has the coeng key.",{"title":71,"text":72,"icon":73},"Keep the ones you like","Fonts you keep become stickers on a board, so comparing them feels like a desk, not a list.","i-f7-square-stack",{"title":75,"text":76,"icon":77},"Checks that matter","Each font page measures real Khmer lines, suggests a line height and shows how big the web files are.","i-f7-checkmark-seal",{"title":79,"text":80,"icon":81},"Code to copy","HTML, CSS, Tailwind and Nuxt snippets for any font, with pairs that work together.","i-f7-chevron-left-slash-chevron-right",{"title":83,"text":84,"icon":85},"Posters","Turn your words into a poster with frames, stickers and patterns, then save it.","i-f7-photo",{"title":87,"path":88,"description":89,"kind":90,"order":28,"status":59,"logo":18,"icon":91,"url":92,"features":93},"Form Engine","\u002Fwork\u002Fform-engine","Forms written once in TypeScript.","side","i-f7-checkmark-square","https:\u002F\u002Fform.sothearo.dev",[94,98],{"title":95,"text":96,"icon":97},"One schema","Describe a form once and get a step by step wizard with checks built in.","i-f7-doc-text",{"title":99,"text":100,"icon":101},"A playground","Learn by writing real forms in the browser, with no backend to set up.","i-f7-play-rectangle",{"title":103,"path":104,"description":105,"kind":58,"order":37,"status":106,"logo":107,"icon":18,"url":18,"features":108},"Mitai","\u002Fwork\u002Fmitai","Follow anime, K-drama and TV in one list, and see where each one streams.","building","\u002Flogos\u002Fmitai.svg",[109,113,117,121],{"title":110,"text":111,"icon":112},"This week, at a glance","A schedule of what airs each day for everything you follow.","i-f7-calendar",{"title":114,"text":115,"icon":116},"One watching list","Anime, K-drama and TV together, with each episode ticked off as you go.","i-f7-checkmark-alt-circle",{"title":118,"text":119,"icon":120},"Where to watch","See which legal service has a show in Cambodia before you go looking.","i-f7-tv",{"title":122,"text":123,"icon":101},"Your own files","Later, play the episodes you own in a quiet player of its own.",{"title":125,"path":126,"description":127,"kind":90,"order":37,"status":59,"logo":18,"icon":25,"url":128,"features":129},"Quickkeys","\u002Fwork\u002Fquickkeys","Typing practice with rhythm.","https:\u002F\u002Fwpm.sothearo.dev",[130,134,138],{"title":131,"text":132,"icon":133},"Live speed","Words per minute and accuracy as you type, with charts after each test.","i-f7-speedometer",{"title":135,"text":136,"icon":137},"Race friends","Rooms where everyone types the same text at once.","i-f7-person-2",{"title":139,"text":140,"icon":141},"Themes","Make your own colors with a few lines of CSS.","i-f7-paintbrush",{"title":143,"path":144,"description":145,"kind":90,"order":44,"status":59,"logo":18,"icon":146,"url":147,"features":148},"Mint","\u002Fwork\u002Fmint","A quiet expense tracker.","i-f7-chart-pie","https:\u002F\u002Fmint.sothearo.dev",[149,153],{"title":150,"text":151,"icon":152},"Quick to add","Log a spend in a few taps and get back to your day.","i-f7-plus-circle",{"title":154,"text":155,"icon":156},"See where it goes","Simple charts by category and month.","i-f7-chart-bar",{"title":158,"path":159,"description":160,"kind":58,"order":44,"status":106,"logo":161,"icon":18,"url":18,"features":162},"Stage","\u002Fwork\u002Fstage","Slides and your live app on one stage, for demos that feel live.","\u002Flogos\u002Fstage.svg",[163,167,171],{"title":164,"text":165,"icon":166},"Slides and app together","Your live app sits inside a device frame on the slide, so a demo never means switching windows.","i-f7-device-laptop",{"title":168,"text":169,"icon":170},"Magic move","Shared pieces glide from one scene to the next, like Keynote.","i-f7-wand-stars",{"title":172,"text":173,"icon":174},"Present mode","A clean full screen for the room, with notes and what comes next for you.","i-f7-play-circle",{"title":176,"path":177,"description":178,"kind":58,"order":52,"status":106,"logo":179,"icon":18,"url":18,"features":180},"Reel","\u002Fwork\u002Freel","Videos made from code. Write scenes and render them in the browser.","\u002Flogos\u002Freel.svg",[181,184,188],{"title":182,"text":183,"icon":81},"Scenes in code","Write each scene in Vue, React or Markdown on one timeline.",{"title":185,"text":186,"icon":187},"Real motion","Springs and easing from a small frame clock, so every frame is exact.","i-f7-waveform-path",{"title":189,"text":190,"icon":191},"Render in the browser","Export a video right in the tab, or from the command line with ffmpeg.","i-f7-film",{"title":193,"path":194,"description":195,"kind":90,"order":52,"status":59,"logo":18,"icon":196,"url":197,"features":198},"Unmarkdown","\u002Fwork\u002Funmarkdown","A markdown editor in your browser.","i-f7-doc-plaintext","https:\u002F\u002Funmarkdown.sothearo.dev",[199,203,206],{"title":200,"text":201,"icon":202},"Live preview","Rendered markdown beside your text as you type, with code and diagrams.","i-f7-square-split-2x1",{"title":204,"text":205,"icon":25},"Vim and formatting","Toggle Vim keys and tidy a note with one shortcut.",{"title":207,"text":208,"icon":209},"Share by link","The note lives in the link itself, so nothing is stored on a server.","i-f7-link",{"id":211,"title":30,"body":212,"description":32,"extension":1321,"icon":34,"meta":1322,"navigation":26,"new":35,"order":37,"path":31,"rawbody":1323,"seo":1324,"stem":36,"tag":33,"__hash__":1325},"components\u002Fcomponents\u002Fswipe-actions.md",{"type":213,"value":214,"toc":1311},"minimark",[215,220,224,228,232,235,239,242,615,867,871,897,901,985,1069,1082,1086,1149,1208,1212,1281,1292,1296,1307],[216,217,219],"h2",{"id":218},"preview","Preview",[221,222,223],"p",{},"Swipe a chat left or right. On a laptop, drag it or swipe with two fingers on the trackpad. Swipe all the way to delete.",[225,226],"prose-demo",{"name":227},"swipe-actions",[216,229,231],{"id":230},"install","Install",[233,234],"prose-install",{"name":227},[216,236,238],{"id":237},"usage","Usage",[221,240,241],{},"Wrap any row. Give it actions for each side, and handle them in one place. The row needs a solid background so the actions stay hidden behind it.",[243,244,246],"prose-framework",{"name":245},"vue",[247,248,253],"pre",{"className":249,"code":250,"filename":251,"language":245,"meta":252,"style":252},"language-vue shiki shiki-themes sothearo-ink-light sothearo-ink-light sothearo-ink-dark","\u003Cscript setup lang=\"ts\">\nimport SwipeActions from \"@\u002Fcomponents\u002Fswipe-actions\u002FSwipeActions.vue\";\n\nconst trailing = [\n  { id: \"mute\", label: \"Mute\", color: \"#5e5ce6\" },\n  { id: \"delete\", label: \"Delete\", color: \"#ff453a\" },\n];\n\nfunction handle(action) {\n  if (action.id === \"delete\")\n    removeChat();\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSwipeActions :trailing=\"trailing\" full-swipe @action=\"handle\">\n    \u003CChatRow class=\"bg-white\" \u002F>\n  \u003C\u002FSwipeActions>\n\u003C\u002Ftemplate>\n","Inbox.vue","",[254,255,256,290,314,319,334,385,429,435,440,461,490,499,505,515,520,530,572,596,606],"code",{"__ignoreMap":252},[257,258,260,264,268,272,275,278,281,285,287],"span",{"class":259,"line":28},"line",[257,261,263],{"class":262},"skAxj","\u003C",[257,265,267],{"class":266},"s5gRC","script",[257,269,271],{"class":270},"sWLoX"," setup",[257,273,274],{"class":270}," lang",[257,276,277],{"class":262},"=",[257,279,280],{"class":262},"\"",[257,282,284],{"class":283},"s0vWP","ts",[257,286,280],{"class":262},[257,288,289],{"class":262},">\n",[257,291,292,296,300,303,306,309,311],{"class":259,"line":37},[257,293,295],{"class":294},"s1EZa","import",[257,297,299],{"class":298},"sfWAO"," SwipeActions ",[257,301,302],{"class":294},"from",[257,304,305],{"class":262}," \"",[257,307,308],{"class":283},"@\u002Fcomponents\u002Fswipe-actions\u002FSwipeActions.vue",[257,310,280],{"class":262},[257,312,313],{"class":262},";\n",[257,315,316],{"class":259,"line":44},[257,317,318],{"emptyLinePlaceholder":26},"\n",[257,320,321,324,328,331],{"class":259,"line":52},[257,322,323],{"class":294},"const",[257,325,327],{"class":326},"si8qm"," trailing",[257,329,330],{"class":262}," =",[257,332,333],{"class":262}," [\n",[257,335,337,340,343,346,348,351,353,356,359,361,363,366,368,370,373,375,377,380,382],{"class":259,"line":336},5,[257,338,339],{"class":262},"  {",[257,341,342],{"class":270}," id",[257,344,345],{"class":262},":",[257,347,305],{"class":262},[257,349,350],{"class":283},"mute",[257,352,280],{"class":262},[257,354,355],{"class":262},",",[257,357,358],{"class":270}," label",[257,360,345],{"class":262},[257,362,305],{"class":262},[257,364,365],{"class":283},"Mute",[257,367,280],{"class":262},[257,369,355],{"class":262},[257,371,372],{"class":270}," color",[257,374,345],{"class":262},[257,376,305],{"class":262},[257,378,379],{"class":283},"#5e5ce6",[257,381,280],{"class":262},[257,383,384],{"class":262}," },\n",[257,386,388,390,392,394,396,399,401,403,405,407,409,412,414,416,418,420,422,425,427],{"class":259,"line":387},6,[257,389,339],{"class":262},[257,391,342],{"class":270},[257,393,345],{"class":262},[257,395,305],{"class":262},[257,397,398],{"class":283},"delete",[257,400,280],{"class":262},[257,402,355],{"class":262},[257,404,358],{"class":270},[257,406,345],{"class":262},[257,408,305],{"class":262},[257,410,411],{"class":283},"Delete",[257,413,280],{"class":262},[257,415,355],{"class":262},[257,417,372],{"class":270},[257,419,345],{"class":262},[257,421,305],{"class":262},[257,423,424],{"class":283},"#ff453a",[257,426,280],{"class":262},[257,428,384],{"class":262},[257,430,432],{"class":259,"line":431},7,[257,433,434],{"class":262},"];\n",[257,436,438],{"class":259,"line":437},8,[257,439,318],{"emptyLinePlaceholder":26},[257,441,443,446,449,452,455,458],{"class":259,"line":442},9,[257,444,445],{"class":294},"function",[257,447,448],{"class":266}," handle",[257,450,451],{"class":262},"(",[257,453,454],{"class":298},"action",[257,456,457],{"class":262},")",[257,459,460],{"class":262}," {\n",[257,462,464,467,470,472,475,478,481,483,485,487],{"class":259,"line":463},10,[257,465,466],{"class":294},"  if",[257,468,469],{"class":262}," (",[257,471,454],{"class":298},[257,473,474],{"class":262},".",[257,476,477],{"class":270},"id",[257,479,480],{"class":262}," ===",[257,482,305],{"class":262},[257,484,398],{"class":283},[257,486,280],{"class":262},[257,488,489],{"class":262},")\n",[257,491,493,496],{"class":259,"line":492},11,[257,494,495],{"class":266},"    removeChat",[257,497,498],{"class":262},"();\n",[257,500,502],{"class":259,"line":501},12,[257,503,504],{"class":262},"}\n",[257,506,508,511,513],{"class":259,"line":507},13,[257,509,510],{"class":262},"\u003C\u002F",[257,512,267],{"class":266},[257,514,289],{"class":262},[257,516,518],{"class":259,"line":517},14,[257,519,318],{"emptyLinePlaceholder":26},[257,521,523,525,528],{"class":259,"line":522},15,[257,524,263],{"class":262},[257,526,527],{"class":266},"template",[257,529,289],{"class":262},[257,531,533,536,539,542,545,547,549,551,553,556,559,561,563,565,568,570],{"class":259,"line":532},16,[257,534,535],{"class":262},"  \u003C",[257,537,538],{"class":266},"SwipeActions",[257,540,541],{"class":262}," :",[257,543,544],{"class":270},"trailing",[257,546,277],{"class":262},[257,548,280],{"class":262},[257,550,544],{"class":298},[257,552,280],{"class":262},[257,554,555],{"class":270}," full-swipe",[257,557,558],{"class":262}," @",[257,560,454],{"class":270},[257,562,277],{"class":262},[257,564,280],{"class":262},[257,566,567],{"class":298},"handle",[257,569,280],{"class":262},[257,571,289],{"class":262},[257,573,575,578,581,584,586,588,591,593],{"class":259,"line":574},17,[257,576,577],{"class":262},"    \u003C",[257,579,580],{"class":266},"ChatRow",[257,582,583],{"class":270}," class",[257,585,277],{"class":262},[257,587,280],{"class":262},[257,589,590],{"class":283},"bg-white",[257,592,280],{"class":262},[257,594,595],{"class":262}," \u002F>\n",[257,597,599,602,604],{"class":259,"line":598},18,[257,600,601],{"class":262},"  \u003C\u002F",[257,603,538],{"class":266},[257,605,289],{"class":262},[257,607,609,611,613],{"class":259,"line":608},19,[257,610,510],{"class":262},[257,612,527],{"class":266},[257,614,289],{"class":262},[243,616,618],{"name":617},"react",[247,619,624],{"className":620,"code":621,"filename":622,"language":623,"meta":252,"style":252},"language-tsx shiki shiki-themes sothearo-ink-light sothearo-ink-light sothearo-ink-dark","import { SwipeActions } from \"@\u002Fcomponents\u002Fswipe-actions\u002FSwipeActions\";\n\nconst trailing = [\n  { id: \"mute\", label: \"Mute\", color: \"#5e5ce6\" },\n  { id: \"delete\", label: \"Delete\", color: \"#ff453a\" },\n];\n\nexport function Inbox() {\n  return (\n    \u003CSwipeActions trailing={trailing} fullSwipe onAction={action => action.id === \"delete\" && removeChat()}>\n      \u003CChatRow className=\"bg-white\" \u002F>\n    \u003C\u002FSwipeActions>\n  );\n}\n","Inbox.tsx","tsx",[254,625,626,650,654,664,704,744,748,752,768,776,829,849,858,863],{"__ignoreMap":252},[257,627,628,630,633,635,638,641,643,646,648],{"class":259,"line":28},[257,629,295],{"class":294},[257,631,632],{"class":262}," {",[257,634,299],{"class":298},[257,636,637],{"class":262},"}",[257,639,640],{"class":294}," from",[257,642,305],{"class":262},[257,644,645],{"class":283},"@\u002Fcomponents\u002Fswipe-actions\u002FSwipeActions",[257,647,280],{"class":262},[257,649,313],{"class":262},[257,651,652],{"class":259,"line":37},[257,653,318],{"emptyLinePlaceholder":26},[257,655,656,658,660,662],{"class":259,"line":44},[257,657,323],{"class":294},[257,659,327],{"class":326},[257,661,330],{"class":262},[257,663,333],{"class":262},[257,665,666,668,670,672,674,676,678,680,682,684,686,688,690,692,694,696,698,700,702],{"class":259,"line":52},[257,667,339],{"class":262},[257,669,342],{"class":270},[257,671,345],{"class":262},[257,673,305],{"class":262},[257,675,350],{"class":283},[257,677,280],{"class":262},[257,679,355],{"class":262},[257,681,358],{"class":270},[257,683,345],{"class":262},[257,685,305],{"class":262},[257,687,365],{"class":283},[257,689,280],{"class":262},[257,691,355],{"class":262},[257,693,372],{"class":270},[257,695,345],{"class":262},[257,697,305],{"class":262},[257,699,379],{"class":283},[257,701,280],{"class":262},[257,703,384],{"class":262},[257,705,706,708,710,712,714,716,718,720,722,724,726,728,730,732,734,736,738,740,742],{"class":259,"line":336},[257,707,339],{"class":262},[257,709,342],{"class":270},[257,711,345],{"class":262},[257,713,305],{"class":262},[257,715,398],{"class":283},[257,717,280],{"class":262},[257,719,355],{"class":262},[257,721,358],{"class":270},[257,723,345],{"class":262},[257,725,305],{"class":262},[257,727,411],{"class":283},[257,729,280],{"class":262},[257,731,355],{"class":262},[257,733,372],{"class":270},[257,735,345],{"class":262},[257,737,305],{"class":262},[257,739,424],{"class":283},[257,741,280],{"class":262},[257,743,384],{"class":262},[257,745,746],{"class":259,"line":387},[257,747,434],{"class":262},[257,749,750],{"class":259,"line":431},[257,751,318],{"emptyLinePlaceholder":26},[257,753,754,757,760,763,766],{"class":259,"line":437},[257,755,756],{"class":294},"export",[257,758,759],{"class":294}," function",[257,761,762],{"class":266}," Inbox",[257,764,765],{"class":262},"()",[257,767,460],{"class":262},[257,769,770,773],{"class":259,"line":442},[257,771,772],{"class":294},"  return",[257,774,775],{"class":262}," (\n",[257,777,778,780,782,784,787,789,791,794,797,799,802,805,808,810,812,814,816,818,820,823,826],{"class":259,"line":463},[257,779,577],{"class":262},[257,781,538],{"class":266},[257,783,327],{"class":270},[257,785,786],{"class":262},"={",[257,788,544],{"class":298},[257,790,637],{"class":262},[257,792,793],{"class":270}," fullSwipe",[257,795,796],{"class":270}," onAction",[257,798,786],{"class":262},[257,800,801],{"class":298},"action ",[257,803,804],{"class":294},"=>",[257,806,807],{"class":298}," action",[257,809,474],{"class":262},[257,811,477],{"class":270},[257,813,480],{"class":262},[257,815,305],{"class":262},[257,817,398],{"class":283},[257,819,280],{"class":262},[257,821,822],{"class":262}," &&",[257,824,825],{"class":266}," removeChat",[257,827,828],{"class":262},"()}>\n",[257,830,831,834,836,839,841,843,845,847],{"class":259,"line":492},[257,832,833],{"class":262},"      \u003C",[257,835,580],{"class":266},[257,837,838],{"class":270}," className",[257,840,277],{"class":262},[257,842,280],{"class":262},[257,844,590],{"class":283},[257,846,280],{"class":262},[257,848,595],{"class":262},[257,850,851,854,856],{"class":259,"line":501},[257,852,853],{"class":262},"    \u003C\u002F",[257,855,538],{"class":266},[257,857,289],{"class":262},[257,859,860],{"class":259,"line":507},[257,861,862],{"class":262},"  );\n",[257,864,865],{"class":259,"line":517},[257,866,504],{"class":262},[216,868,870],{"id":869},"how-it-moves","How it moves",[872,873,874,878,881,884,891,894],"ul",{},[875,876,877],"li",{},"The row only takes over once you drag sideways, so the page still scrolls.",[875,879,880],{},"Past the last action it slows down like a rubber band instead of stopping hard.",[875,882,883],{},"Letting go, it opens or closes from how far and how fast you moved.",[875,885,886,887,890],{},"With ",[254,888,889],{},"full-swipe",", dragging past 60% stretches the outer action across the row and runs it.",[875,892,893],{},"You can catch the row while it's still moving.",[875,895,896],{},"Only one row is open at a time, and tapping outside closes it.",[216,898,900],{"id":899},"props","Props",[243,902,903],{"name":245},[904,905,906,925],"table",{},[907,908,909],"thead",{},[910,911,912,916,919,922],"tr",{},[913,914,915],"th",{},"Prop",[913,917,918],{},"Type",[913,920,921],{},"Default",[913,923,924],{},"What it does",[926,927,928,949,966],"tbody",{},[910,929,930,936,941,946],{},[931,932,933],"td",{},[254,934,935],{},"leading",[931,937,938],{},[254,939,940],{},"SwipeAction[]",[931,942,943],{},[254,944,945],{},"[]",[931,947,948],{},"Actions revealed by swiping right.",[910,950,951,955,959,963],{},[931,952,953],{},[254,954,544],{},[931,956,957],{},[254,958,940],{},[931,960,961],{},[254,962,945],{},[931,964,965],{},"Actions revealed by swiping left.",[910,967,968,972,977,982],{},[931,969,970],{},[254,971,889],{},[931,973,974],{},[254,975,976],{},"boolean",[931,978,979],{},[254,980,981],{},"false",[931,983,984],{},"A long swipe runs the outer action.",[243,986,987],{"name":617},[904,988,989,1001],{},[907,990,991],{},[910,992,993,995,997,999],{},[913,994,915],{},[913,996,918],{},[913,998,921],{},[913,1000,924],{},[926,1002,1003,1019,1035,1052],{},[910,1004,1005,1009,1013,1017],{},[931,1006,1007],{},[254,1008,935],{},[931,1010,1011],{},[254,1012,940],{},[931,1014,1015],{},[254,1016,945],{},[931,1018,948],{},[910,1020,1021,1025,1029,1033],{},[931,1022,1023],{},[254,1024,544],{},[931,1026,1027],{},[254,1028,940],{},[931,1030,1031],{},[254,1032,945],{},[931,1034,965],{},[910,1036,1037,1042,1046,1050],{},[931,1038,1039],{},[254,1040,1041],{},"fullSwipe",[931,1043,1044],{},[254,1045,976],{},[931,1047,1048],{},[254,1049,981],{},[931,1051,984],{},[910,1053,1054,1059,1064,1066],{},[931,1055,1056],{},[254,1057,1058],{},"className",[931,1060,1061],{},[254,1062,1063],{},"string",[931,1065],{},[931,1067,1068],{},"Added to the row.",[221,1070,1071,1072,1074,1075,1078,1079,474],{},"Each action has an ",[254,1073,477],{},", a ",[254,1076,1077],{},"label"," for screen readers, and an optional ",[254,1080,1081],{},"color",[216,1083,1085],{"id":1084},"events-and-slots","Events and slots",[243,1087,1088],{"name":245},[904,1089,1090,1103],{},[907,1091,1092],{},[910,1093,1094,1097,1100],{},[913,1095,1096],{},"Name",[913,1098,1099],{},"Gives you",[913,1101,1102],{},"When",[926,1104,1105,1119,1133],{},[910,1106,1107,1112,1116],{},[931,1108,1109],{},[254,1110,1111],{},"@action",[931,1113,1114],{},[254,1115,454],{},[931,1117,1118],{},"An action is tapped or swiped all the way.",[910,1120,1121,1126,1130],{},[931,1122,1123],{},[254,1124,1125],{},"#action",[931,1127,1128],{},[254,1129,454],{},[931,1131,1132],{},"Replace what each action shows, like an icon.",[910,1134,1135,1144,1146],{},[931,1136,1137,1140,1141],{},[254,1138,1139],{},"open(side)",", ",[254,1142,1143],{},"close()",[931,1145],{},[931,1147,1148],{},"Call them through a template ref.",[243,1150,1151],{"name":617},[904,1152,1153,1163],{},[907,1154,1155],{},[910,1156,1157,1159,1161],{},[913,1158,1096],{},[913,1160,1099],{},[913,1162,1102],{},[926,1164,1165,1178,1192],{},[910,1166,1167,1172,1176],{},[931,1168,1169],{},[254,1170,1171],{},"onAction",[931,1173,1174],{},[254,1175,454],{},[931,1177,1118],{},[910,1179,1180,1185,1189],{},[931,1181,1182],{},[254,1183,1184],{},"renderAction",[931,1186,1187],{},[254,1188,454],{},[931,1190,1191],{},"Return what each action shows, like an icon.",[910,1193,1194,1200,1202],{},[931,1195,1196,1140,1198],{},[254,1197,1139],{},[254,1199,1143],{},[931,1201],{},[931,1203,1204,1205,474],{},"Call them through ",[254,1206,1207],{},"ref",[216,1209,1211],{"id":1210},"customise","Customise",[247,1213,1218],{"className":1214,"code":1215,"filename":1216,"language":1217,"meta":252,"style":252},"language-css shiki shiki-themes sothearo-ink-light sothearo-ink-light sothearo-ink-dark","[data-swipe-actions] {\n  --swipe-actions-size: 40px;\n  --swipe-actions-gap: 10px;\n  --swipe-actions-duration: 400ms;\n}\n","swipe.css","css",[254,1219,1220,1233,1248,1262,1277],{"__ignoreMap":252},[257,1221,1222,1225,1228,1231],{"class":259,"line":28},[257,1223,1224],{"class":262},"[",[257,1226,1227],{"class":270},"data-swipe-actions",[257,1229,1230],{"class":262},"]",[257,1232,460],{"class":262},[257,1234,1235,1238,1240,1243,1246],{"class":259,"line":37},[257,1236,1237],{"class":298},"  --swipe-actions-size",[257,1239,345],{"class":262},[257,1241,1242],{"class":326}," 40",[257,1244,1245],{"class":294},"px",[257,1247,313],{"class":262},[257,1249,1250,1253,1255,1258,1260],{"class":259,"line":44},[257,1251,1252],{"class":298},"  --swipe-actions-gap",[257,1254,345],{"class":262},[257,1256,1257],{"class":326}," 10",[257,1259,1245],{"class":294},[257,1261,313],{"class":262},[257,1263,1264,1267,1269,1272,1275],{"class":259,"line":52},[257,1265,1266],{"class":298},"  --swipe-actions-duration",[257,1268,345],{"class":262},[257,1270,1271],{"class":326}," 400",[257,1273,1274],{"class":294},"ms",[257,1276,313],{"class":262},[257,1278,1279],{"class":259,"line":336},[257,1280,504],{"class":262},[221,1282,1283,1284,1287,1288,1291],{},"Size and gap also set how far the row opens, so there's nothing to keep in sync. The row carries ",[254,1285,1286],{},"data-open"," with the side that's open, and ",[254,1289,1290],{},"data-dragging"," while you drag.",[216,1293,1295],{"id":1294},"accessibility","Accessibility",[872,1297,1298,1301,1304],{},[875,1299,1300],{},"Every action is a real button with a label.",[875,1302,1303],{},"Tabbing to an action opens its side, so keyboard users can reach everything without swiping.",[875,1305,1306],{},"Motion turns off when the system asks for reduced motion.",[1308,1309,1310],"style",{},"html pre.shiki code .skAxj, html code.shiki .skAxj{--shiki-light:#8A8A8A;--shiki-default:#8A8A8A;--shiki-dark:#7A7A7A}html pre.shiki code .s5gRC, html code.shiki .s5gRC{--shiki-light:#7A4FD1;--shiki-default:#7A4FD1;--shiki-dark:#C3A3FF}html pre.shiki code .sWLoX, html code.shiki .sWLoX{--shiki-light:#B3611C;--shiki-default:#B3611C;--shiki-dark:#F2B36B}html pre.shiki code .s0vWP, html code.shiki .s0vWP{--shiki-light:#2F8A5B;--shiki-default:#2F8A5B;--shiki-dark:#7FD1A3}html pre.shiki code .s1EZa, html code.shiki .s1EZa{--shiki-light:#C4336A;--shiki-default:#C4336A;--shiki-dark:#FF7AB2}html pre.shiki code .sfWAO, html code.shiki .sfWAO{--shiki-light:#2C2C2C;--shiki-default:#2C2C2C;--shiki-dark:#D4D4D4}html pre.shiki code .si8qm, html code.shiki .si8qm{--shiki-light:#2F6FD1;--shiki-default:#2F6FD1;--shiki-dark:#7AB8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":252,"searchDepth":37,"depth":37,"links":1312},[1313,1314,1315,1316,1317,1318,1319,1320],{"id":218,"depth":37,"text":219},{"id":230,"depth":37,"text":231},{"id":237,"depth":37,"text":238},{"id":869,"depth":37,"text":870},{"id":899,"depth":37,"text":900},{"id":1084,"depth":37,"text":1085},{"id":1210,"depth":37,"text":1211},{"id":1294,"depth":37,"text":1295},"md",{},"---\ntitle: Swipe Actions\ndescription: Swipe a row to reveal actions, like in a phone's mail app.\norder: 2\nicon: i-f7-hand-draw\ntag: gesture\n---\n\n## Preview\n\nSwipe a chat left or right. On a laptop, drag it or swipe with two fingers on the trackpad. Swipe all the way to delete.\n\n::prose-demo{name=\"swipe-actions\"}\n::\n\n## Install\n\n::prose-install{name=\"swipe-actions\"}\n::\n\n## Usage\n\nWrap any row. Give it actions for each side, and handle them in one place. The row needs a solid background so the actions stay hidden behind it.\n\n::prose-framework{name=\"vue\"}\n\n```vue [Inbox.vue]\n\u003Cscript setup lang=\"ts\">\nimport SwipeActions from \"@\u002Fcomponents\u002Fswipe-actions\u002FSwipeActions.vue\";\n\nconst trailing = [\n  { id: \"mute\", label: \"Mute\", color: \"#5e5ce6\" },\n  { id: \"delete\", label: \"Delete\", color: \"#ff453a\" },\n];\n\nfunction handle(action) {\n  if (action.id === \"delete\")\n    removeChat();\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSwipeActions :trailing=\"trailing\" full-swipe @action=\"handle\">\n    \u003CChatRow class=\"bg-white\" \u002F>\n  \u003C\u002FSwipeActions>\n\u003C\u002Ftemplate>\n```\n\n::\n\n::prose-framework{name=\"react\"}\n\n```tsx [Inbox.tsx]\nimport { SwipeActions } from \"@\u002Fcomponents\u002Fswipe-actions\u002FSwipeActions\";\n\nconst trailing = [\n  { id: \"mute\", label: \"Mute\", color: \"#5e5ce6\" },\n  { id: \"delete\", label: \"Delete\", color: \"#ff453a\" },\n];\n\nexport function Inbox() {\n  return (\n    \u003CSwipeActions trailing={trailing} fullSwipe onAction={action => action.id === \"delete\" && removeChat()}>\n      \u003CChatRow className=\"bg-white\" \u002F>\n    \u003C\u002FSwipeActions>\n  );\n}\n```\n\n::\n\n## How it moves\n\n- The row only takes over once you drag sideways, so the page still scrolls.\n- Past the last action it slows down like a rubber band instead of stopping hard.\n- Letting go, it opens or closes from how far and how fast you moved.\n- With `full-swipe`, dragging past 60% stretches the outer action across the row and runs it.\n- You can catch the row while it's still moving.\n- Only one row is open at a time, and tapping outside closes it.\n\n## Props\n\n::prose-framework{name=\"vue\"}\n\n| Prop         | Type            | Default | What it does                        |\n| ------------ | --------------- | ------- | ----------------------------------- |\n| `leading`    | `SwipeAction[]` | `[]`    | Actions revealed by swiping right.  |\n| `trailing`   | `SwipeAction[]` | `[]`    | Actions revealed by swiping left.   |\n| `full-swipe` | `boolean`       | `false` | A long swipe runs the outer action. |\n\n::\n\n::prose-framework{name=\"react\"}\n\n| Prop        | Type            | Default | What it does                        |\n| ----------- | --------------- | ------- | ----------------------------------- |\n| `leading`   | `SwipeAction[]` | `[]`    | Actions revealed by swiping right.  |\n| `trailing`  | `SwipeAction[]` | `[]`    | Actions revealed by swiping left.   |\n| `fullSwipe` | `boolean`       | `false` | A long swipe runs the outer action. |\n| `className` | `string`        |         | Added to the row.                   |\n\n::\n\nEach action has an `id`, a `label` for screen readers, and an optional `color`.\n\n## Events and slots\n\n::prose-framework{name=\"vue\"}\n\n| Name                    | Gives you | When                                          |\n| ----------------------- | --------- | --------------------------------------------- |\n| `@action`               | `action`  | An action is tapped or swiped all the way.    |\n| `#action`               | `action`  | Replace what each action shows, like an icon. |\n| `open(side)`, `close()` |           | Call them through a template ref.             |\n\n::\n\n::prose-framework{name=\"react\"}\n\n| Name                    | Gives you | When                                         |\n| ----------------------- | --------- | -------------------------------------------- |\n| `onAction`              | `action`  | An action is tapped or swiped all the way.   |\n| `renderAction`          | `action`  | Return what each action shows, like an icon. |\n| `open(side)`, `close()` |           | Call them through `ref`.                     |\n\n::\n\n## Customise\n\n```css [swipe.css]\n[data-swipe-actions] {\n  --swipe-actions-size: 40px;\n  --swipe-actions-gap: 10px;\n  --swipe-actions-duration: 400ms;\n}\n```\n\nSize and gap also set how far the row opens, so there's nothing to keep in sync. The row carries `data-open` with the side that's open, and `data-dragging` while you drag.\n\n## Accessibility\n\n- Every action is a real button with a label.\n- Tabbing to an action opens its side, so keyboard users can reach everything without swiping.\n- Motion turns off when the system asks for reduced motion.\n",{"title":30,"description":32},"CuTgnvQivRhB9mCF96y6HnGP2T_4DDzJslpLFo68-xk",1795439722753]