loopwind 0.17.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/template.d.ts +97 -0
- package/dist/sdk/template.d.ts.map +1 -1
- package/dist/sdk/template.js +217 -0
- package/dist/sdk/template.js.map +1 -1
- package/examples/code-editor-templates.ts +173 -0
- package/examples/nextjs-template-import.ts +58 -0
- package/examples/visual-builder-templates.ts +336 -0
- package/package.json +3 -1
- package/test-jsx-support.mjs +120 -0
- package/test-sdk-user-templates.mjs +469 -0
- package/website/.astro/integrations/_inox-tools_astro-when/types.d.ts +1 -0
- package/website/.astro/types.d.ts +1 -0
- package/website/DEPLOYMENT.md +142 -0
- package/website/OG_IMAGES.md +141 -0
- package/website/astro.config.mjs +9 -1
- package/website/dist/.gitkeep +1 -0
- package/website/dist/_astro/agents.Yx-L_igG.css +1 -0
- package/website/dist/_routes.json +30 -0
- package/website/dist/_worker.js/_@astrojs-ssr-adapter.mjs +1033 -0
- package/website/dist/_worker.js/_astro-internal_middleware.mjs +40 -0
- package/website/dist/_worker.js/chunks/abap_BTmsHiP5.mjs +1 -0
- package/website/dist/_worker.js/chunks/actionscript-3_DmBelb1E.mjs +1 -0
- package/website/dist/_worker.js/chunks/ada_8-E0ahCN.mjs +1 -0
- package/website/dist/_worker.js/chunks/andromeeda_XI-CXx50.mjs +1 -0
- package/website/dist/_worker.js/chunks/angular-html_DKGh3gGH.mjs +1 -0
- package/website/dist/_worker.js/chunks/angular-ts_-qZGsJoA.mjs +1 -0
- package/website/dist/_worker.js/chunks/apache_ijTUt0Ee.mjs +1 -0
- package/website/dist/_worker.js/chunks/apex_agu1c6Sh.mjs +1 -0
- package/website/dist/_worker.js/chunks/apl_Bj2f7Art.mjs +1 -0
- package/website/dist/_worker.js/chunks/applescript_B_vXrOh3.mjs +1 -0
- package/website/dist/_worker.js/chunks/ara_DCEQ2rnh.mjs +1 -0
- package/website/dist/_worker.js/chunks/asciidoc_CGN_EkYS.mjs +1 -0
- package/website/dist/_worker.js/chunks/asm_BBWZgnDp.mjs +1 -0
- package/website/dist/_worker.js/chunks/astro/assets-service_j52rQLzU.mjs +721 -0
- package/website/dist/_worker.js/chunks/astro/server_Y5_QHO8v.mjs +2401 -0
- package/website/dist/_worker.js/chunks/astro-designed-error-pages_BNTLO-TA.mjs +542 -0
- package/website/dist/_worker.js/chunks/astro_Dr_hht3h.mjs +1 -0
- package/website/dist/_worker.js/chunks/aurora-x_9GHG8nSq.mjs +1 -0
- package/website/dist/_worker.js/chunks/awk_DHRvhXot.mjs +1 -0
- package/website/dist/_worker.js/chunks/ayu-dark_CcvqmEHE.mjs +1 -0
- package/website/dist/_worker.js/chunks/ballerina_C7SdeSZb.mjs +1 -0
- package/website/dist/_worker.js/chunks/bat_Dv4A3u45.mjs +1 -0
- package/website/dist/_worker.js/chunks/beancount_BfPf9Luv.mjs +1 -0
- package/website/dist/_worker.js/chunks/berry_B8rfM3lL.mjs +1 -0
- package/website/dist/_worker.js/chunks/bibtex_TcjYgtJM.mjs +1 -0
- package/website/dist/_worker.js/chunks/bicep_CrlFWCdN.mjs +1 -0
- package/website/dist/_worker.js/chunks/blade_lanKVYID.mjs +1 -0
- package/website/dist/_worker.js/chunks/bsl_BhppzXMB.mjs +1 -0
- package/website/dist/_worker.js/chunks/c_6FBALJTK.mjs +1 -0
- package/website/dist/_worker.js/chunks/cadence_2txU9LVE.mjs +1 -0
- package/website/dist/_worker.js/chunks/cairo_BkrFAIlP.mjs +1 -0
- package/website/dist/_worker.js/chunks/catppuccin-frappe_CkEqIYhU.mjs +1 -0
- package/website/dist/_worker.js/chunks/catppuccin-latte_DG4Gx_-v.mjs +1 -0
- package/website/dist/_worker.js/chunks/catppuccin-macchiato_Cwi3vCXf.mjs +1 -0
- package/website/dist/_worker.js/chunks/catppuccin-mocha_L9_OPlFX.mjs +1 -0
- package/website/dist/_worker.js/chunks/clarity_BEAe4Ulu.mjs +1 -0
- package/website/dist/_worker.js/chunks/clojure_VnUX6p2g.mjs +1 -0
- package/website/dist/_worker.js/chunks/cmake_0-SGkZEj.mjs +1 -0
- package/website/dist/_worker.js/chunks/cobol_92M_KGaE.mjs +1 -0
- package/website/dist/_worker.js/chunks/codeowners_CzMwskBv.mjs +1 -0
- package/website/dist/_worker.js/chunks/codeql_DWJZNHv1.mjs +1 -0
- package/website/dist/_worker.js/chunks/coffee_CQjKU2fh.mjs +1 -0
- package/website/dist/_worker.js/chunks/common-lisp_BBLWDpS5.mjs +1 -0
- package/website/dist/_worker.js/chunks/coq_hedRFV3D.mjs +1 -0
- package/website/dist/_worker.js/chunks/cpp_DlS1i6Zs.mjs +1 -0
- package/website/dist/_worker.js/chunks/crystal_D6n65fKV.mjs +1 -0
- package/website/dist/_worker.js/chunks/csharp_C6FCVFzc.mjs +1 -0
- package/website/dist/_worker.js/chunks/css_C5uJEgmJ.mjs +1 -0
- package/website/dist/_worker.js/chunks/csv_CtMYuuJl.mjs +1 -0
- package/website/dist/_worker.js/chunks/cue_BsPexqx6.mjs +1 -0
- package/website/dist/_worker.js/chunks/cypher_apzf6OBi.mjs +1 -0
- package/website/dist/_worker.js/chunks/d_DcvIRcgm.mjs +1 -0
- package/website/dist/_worker.js/chunks/dark-plus_C01ONtzj.mjs +1 -0
- package/website/dist/_worker.js/chunks/dart_WkzM5WrV.mjs +1 -0
- package/website/dist/_worker.js/chunks/dax_DjXAO5V4.mjs +1 -0
- package/website/dist/_worker.js/chunks/desktop_C92LCxdc.mjs +1 -0
- package/website/dist/_worker.js/chunks/diff_CVwM_9XJ.mjs +1 -0
- package/website/dist/_worker.js/chunks/docker_DPzgJf6Z.mjs +1 -0
- package/website/dist/_worker.js/chunks/dotenv_D_vgANvA.mjs +1 -0
- package/website/dist/_worker.js/chunks/dracula-soft_CLnUBwFm.mjs +1 -0
- package/website/dist/_worker.js/chunks/dracula_lBVpb6Lb.mjs +1 -0
- package/website/dist/_worker.js/chunks/dream-maker_DTLbzd_J.mjs +1 -0
- package/website/dist/_worker.js/chunks/edge_i54JYm3_.mjs +1 -0
- package/website/dist/_worker.js/chunks/elixir_BJCIjTu4.mjs +1 -0
- package/website/dist/_worker.js/chunks/elm_BbXD39-_.mjs +1 -0
- package/website/dist/_worker.js/chunks/emacs-lisp_pxa5cXaN.mjs +1 -0
- package/website/dist/_worker.js/chunks/erb_Ccjijeee.mjs +1 -0
- package/website/dist/_worker.js/chunks/erlang_B2VM_hi7.mjs +1 -0
- package/website/dist/_worker.js/chunks/everforest-dark_BxvIPBim.mjs +1 -0
- package/website/dist/_worker.js/chunks/everforest-light_B7VoyaJM.mjs +1 -0
- package/website/dist/_worker.js/chunks/fennel_D-uo7X6c.mjs +1 -0
- package/website/dist/_worker.js/chunks/fish_BjePoK3m.mjs +1 -0
- package/website/dist/_worker.js/chunks/fluent_C8fgkzLX.mjs +1 -0
- package/website/dist/_worker.js/chunks/fortran-fixed-form_D1pu5zrc.mjs +1 -0
- package/website/dist/_worker.js/chunks/fortran-free-form_CSGOhJD6.mjs +1 -0
- package/website/dist/_worker.js/chunks/fsharp_B0xy-A4Y.mjs +1 -0
- package/website/dist/_worker.js/chunks/gdresource_CWppjlHq.mjs +1 -0
- package/website/dist/_worker.js/chunks/gdscript_eQCHchcS.mjs +1 -0
- package/website/dist/_worker.js/chunks/gdshader_C4kxepX7.mjs +1 -0
- package/website/dist/_worker.js/chunks/genie_ACtQLcDW.mjs +1 -0
- package/website/dist/_worker.js/chunks/gherkin_BFp2uKUd.mjs +1 -0
- package/website/dist/_worker.js/chunks/git-commit_CLg9ZwMV.mjs +1 -0
- package/website/dist/_worker.js/chunks/git-rebase_DG8A80Nt.mjs +1 -0
- package/website/dist/_worker.js/chunks/github-dark-default_BI0EP2Kv.mjs +1 -0
- package/website/dist/_worker.js/chunks/github-dark-dimmed_a_NIC0Xb.mjs +1 -0
- package/website/dist/_worker.js/chunks/github-dark-high-contrast_jZGqT7hk.mjs +1 -0
- package/website/dist/_worker.js/chunks/github-dark_CHCDNd2O.mjs +1 -0
- package/website/dist/_worker.js/chunks/github-light-default_DRbOW5RG.mjs +1 -0
- package/website/dist/_worker.js/chunks/github-light-high-contrast_tn_kWutM.mjs +1 -0
- package/website/dist/_worker.js/chunks/github-light_D9brYzot.mjs +1 -0
- package/website/dist/_worker.js/chunks/gleam_Dmhu1oxW.mjs +1 -0
- package/website/dist/_worker.js/chunks/glimmer-js_BfZbXy8A.mjs +1 -0
- package/website/dist/_worker.js/chunks/glimmer-ts_B9QVICrD.mjs +1 -0
- package/website/dist/_worker.js/chunks/glsl_DD2PPwOs.mjs +1 -0
- package/website/dist/_worker.js/chunks/gnuplot_D2OYChUX.mjs +1 -0
- package/website/dist/_worker.js/chunks/go_DYGFTe3h.mjs +1 -0
- package/website/dist/_worker.js/chunks/graphql_B7XsT3nH.mjs +1 -0
- package/website/dist/_worker.js/chunks/groovy_BO12Uwkl.mjs +1 -0
- package/website/dist/_worker.js/chunks/hack_CB2_ztCP.mjs +1 -0
- package/website/dist/_worker.js/chunks/haml_CyfDcDD3.mjs +1 -0
- package/website/dist/_worker.js/chunks/handlebars_CfpxpWm2.mjs +1 -0
- package/website/dist/_worker.js/chunks/haskell_jUeC5uN5.mjs +1 -0
- package/website/dist/_worker.js/chunks/haxe_B6GxP1WB.mjs +1 -0
- package/website/dist/_worker.js/chunks/hcl_DwoHV2oh.mjs +1 -0
- package/website/dist/_worker.js/chunks/hjson_DV7cJRk4.mjs +1 -0
- package/website/dist/_worker.js/chunks/hlsl_BlFCscPI.mjs +1 -0
- package/website/dist/_worker.js/chunks/houston_COBFG1Mx.mjs +1 -0
- package/website/dist/_worker.js/chunks/html-derivative_C9pJ337h.mjs +1 -0
- package/website/dist/_worker.js/chunks/html_D1OkrZS5.mjs +1 -0
- package/website/dist/_worker.js/chunks/http_DIGXRqvJ.mjs +1 -0
- package/website/dist/_worker.js/chunks/hxml_DEwh9i-c.mjs +1 -0
- package/website/dist/_worker.js/chunks/hy_DDoIgW1K.mjs +1 -0
- package/website/dist/_worker.js/chunks/imba_B00zbHo4.mjs +1 -0
- package/website/dist/_worker.js/chunks/index_C1UTDwYg.mjs +1861 -0
- package/website/dist/_worker.js/chunks/ini_D7XQA_p8.mjs +1 -0
- package/website/dist/_worker.js/chunks/java_B9wdFd8K.mjs +1 -0
- package/website/dist/_worker.js/chunks/javascript_CLsPGOON.mjs +1 -0
- package/website/dist/_worker.js/chunks/jinja_jarBCAN1.mjs +1 -0
- package/website/dist/_worker.js/chunks/jison_oGg3J708.mjs +1 -0
- package/website/dist/_worker.js/chunks/json5_DlZ1Kyaa.mjs +1 -0
- package/website/dist/_worker.js/chunks/json_DaYk_FMp.mjs +1 -0
- package/website/dist/_worker.js/chunks/jsonc_DlwgfSDs.mjs +1 -0
- package/website/dist/_worker.js/chunks/jsonl_BbCCVaZF.mjs +1 -0
- package/website/dist/_worker.js/chunks/jsonnet_Dt-G75xe.mjs +1 -0
- package/website/dist/_worker.js/chunks/jssm_BtKFTj2A.mjs +1 -0
- package/website/dist/_worker.js/chunks/jsx_DDx_xAZ8.mjs +1 -0
- package/website/dist/_worker.js/chunks/julia_CK0lv68l.mjs +1 -0
- package/website/dist/_worker.js/chunks/kanagawa-dragon_BldAK3Oo.mjs +1 -0
- package/website/dist/_worker.js/chunks/kanagawa-lotus_DVM8FX9_.mjs +1 -0
- package/website/dist/_worker.js/chunks/kanagawa-wave_Dpih0AKP.mjs +1 -0
- package/website/dist/_worker.js/chunks/kotlin_kWneB9V_.mjs +1 -0
- package/website/dist/_worker.js/chunks/kusto_BKVATd95.mjs +1 -0
- package/website/dist/_worker.js/chunks/laserwave_BqatxsVl.mjs +1 -0
- package/website/dist/_worker.js/chunks/latex_LVDcGBbc.mjs +1 -0
- package/website/dist/_worker.js/chunks/lean_W7qo-5M2.mjs +1 -0
- package/website/dist/_worker.js/chunks/less_DFNwJnBH.mjs +1 -0
- package/website/dist/_worker.js/chunks/light-plus_Dp0AoWsO.mjs +1 -0
- package/website/dist/_worker.js/chunks/liquid_D24qs0pc.mjs +1 -0
- package/website/dist/_worker.js/chunks/log_IPWMXriF.mjs +1 -0
- package/website/dist/_worker.js/chunks/logo_C6KaatrQ.mjs +1 -0
- package/website/dist/_worker.js/chunks/lua_CwnEf-T7.mjs +1 -0
- package/website/dist/_worker.js/chunks/luau_Br3-CXjS.mjs +1 -0
- package/website/dist/_worker.js/chunks/make_UBNG-kOo.mjs +1 -0
- package/website/dist/_worker.js/chunks/markdown_C7mhJFCm.mjs +1 -0
- package/website/dist/_worker.js/chunks/marko_4tchUvI7.mjs +1 -0
- package/website/dist/_worker.js/chunks/material-theme-darker_SKtaNEPn.mjs +1 -0
- package/website/dist/_worker.js/chunks/material-theme-lighter_zOX_DZCH.mjs +1 -0
- package/website/dist/_worker.js/chunks/material-theme-ocean_BN9WbhdC.mjs +1 -0
- package/website/dist/_worker.js/chunks/material-theme-palenight_DT_covjH.mjs +1 -0
- package/website/dist/_worker.js/chunks/material-theme_6RpeM3kc.mjs +1 -0
- package/website/dist/_worker.js/chunks/matlab_DCOXsPKR.mjs +1 -0
- package/website/dist/_worker.js/chunks/mdc_B9gb2UFP.mjs +1 -0
- package/website/dist/_worker.js/chunks/mdx_DGU7Nu9u.mjs +1 -0
- package/website/dist/_worker.js/chunks/mermaid_B69URzsZ.mjs +1 -0
- package/website/dist/_worker.js/chunks/min-dark_BgxifOMI.mjs +1 -0
- package/website/dist/_worker.js/chunks/min-light_BrPjXxUp.mjs +1 -0
- package/website/dist/_worker.js/chunks/mipsasm_9U-4_t7k.mjs +1 -0
- package/website/dist/_worker.js/chunks/mojo_B0wt7ug3.mjs +1 -0
- package/website/dist/_worker.js/chunks/monokai_B6Pxpoyi.mjs +1 -0
- package/website/dist/_worker.js/chunks/move_1eid4CyR.mjs +1 -0
- package/website/dist/_worker.js/chunks/narrat_Ds6-p5JZ.mjs +1 -0
- package/website/dist/_worker.js/chunks/nextflow_v2N1Qlqa.mjs +1 -0
- package/website/dist/_worker.js/chunks/nginx_Bp9Ab2NH.mjs +1 -0
- package/website/dist/_worker.js/chunks/night-owl_CdwOw_sc.mjs +1 -0
- package/website/dist/_worker.js/chunks/nim_BXGDUe53.mjs +1 -0
- package/website/dist/_worker.js/chunks/nix_CUig1nJH.mjs +1 -0
- package/website/dist/_worker.js/chunks/noop-middleware_DlWGj5t5.mjs +10 -0
- package/website/dist/_worker.js/chunks/nord_SPoG1iae.mjs +1 -0
- package/website/dist/_worker.js/chunks/nushell_DJw1Lca8.mjs +1 -0
- package/website/dist/_worker.js/chunks/objective-c_Bktzl_CO.mjs +1 -0
- package/website/dist/_worker.js/chunks/objective-cpp_CP4DWdDp.mjs +1 -0
- package/website/dist/_worker.js/chunks/ocaml_CeEAs7bZ.mjs +1 -0
- package/website/dist/_worker.js/chunks/one-dark-pro_-hIwCNMi.mjs +1 -0
- package/website/dist/_worker.js/chunks/one-light_DSmYvJ05.mjs +1 -0
- package/website/dist/_worker.js/chunks/pascal_C-S_Ms_o.mjs +1 -0
- package/website/dist/_worker.js/chunks/perl_CKamvo15.mjs +1 -0
- package/website/dist/_worker.js/chunks/php_BlmcX_F3.mjs +1 -0
- package/website/dist/_worker.js/chunks/plastic_Ryt8tVoA.mjs +1 -0
- package/website/dist/_worker.js/chunks/plsql_Cb3v7cBj.mjs +1 -0
- package/website/dist/_worker.js/chunks/po_DZbdNRlo.mjs +1 -0
- package/website/dist/_worker.js/chunks/poimandres_bYmE3_5d.mjs +1 -0
- package/website/dist/_worker.js/chunks/polar_pJkMGwoW.mjs +1 -0
- package/website/dist/_worker.js/chunks/postcss_BAXSOKgk.mjs +1 -0
- package/website/dist/_worker.js/chunks/powerquery_oITMGN4x.mjs +1 -0
- package/website/dist/_worker.js/chunks/powershell_6306-xIF.mjs +1 -0
- package/website/dist/_worker.js/chunks/prisma_DSDxnZGz.mjs +1 -0
- package/website/dist/_worker.js/chunks/prolog_CxG7tjZR.mjs +1 -0
- package/website/dist/_worker.js/chunks/proto_CS9ByXm1.mjs +1 -0
- package/website/dist/_worker.js/chunks/pug_BMtLJo6U.mjs +1 -0
- package/website/dist/_worker.js/chunks/puppet_BfeeSzee.mjs +1 -0
- package/website/dist/_worker.js/chunks/purescript_BFfueNaH.mjs +1 -0
- package/website/dist/_worker.js/chunks/python_Cc4Faapv.mjs +1 -0
- package/website/dist/_worker.js/chunks/qml_C1CTJTK8.mjs +1 -0
- package/website/dist/_worker.js/chunks/qmldir_nG1KaqKR.mjs +1 -0
- package/website/dist/_worker.js/chunks/qss_Cncxk263.mjs +1 -0
- package/website/dist/_worker.js/chunks/r_ChR54Ihi.mjs +1 -0
- package/website/dist/_worker.js/chunks/racket_BDrhptDs.mjs +1 -0
- package/website/dist/_worker.js/chunks/raku_07OUHa0P.mjs +1 -0
- package/website/dist/_worker.js/chunks/razor_DIP3INLa.mjs +1 -0
- package/website/dist/_worker.js/chunks/red_DOPXfj-6.mjs +1 -0
- package/website/dist/_worker.js/chunks/reg_B64SwEDj.mjs +1 -0
- package/website/dist/_worker.js/chunks/regexp_ButFGoB5.mjs +1 -0
- package/website/dist/_worker.js/chunks/rel_BWJAWqZD.mjs +1 -0
- package/website/dist/_worker.js/chunks/riscv_79gXlbsF.mjs +1 -0
- package/website/dist/_worker.js/chunks/rose-pine-dawn_DHIjVGd3.mjs +1 -0
- package/website/dist/_worker.js/chunks/rose-pine-moon_t86aEbs0.mjs +1 -0
- package/website/dist/_worker.js/chunks/rose-pine_BHgrcDCs.mjs +1 -0
- package/website/dist/_worker.js/chunks/rst_D3F4Fcpj.mjs +1 -0
- package/website/dist/_worker.js/chunks/ruby_Cs7vM9iv.mjs +1 -0
- package/website/dist/_worker.js/chunks/rust_DpyRVatH.mjs +1 -0
- package/website/dist/_worker.js/chunks/sas_DW45xZXN.mjs +1 -0
- package/website/dist/_worker.js/chunks/sass_C6SiMwN_.mjs +1 -0
- package/website/dist/_worker.js/chunks/scala_DlZOjNZk.mjs +1 -0
- package/website/dist/_worker.js/chunks/scheme_D2ezSJXu.mjs +1 -0
- package/website/dist/_worker.js/chunks/scss_DG5Spjqu.mjs +1 -0
- package/website/dist/_worker.js/chunks/sdbl_ZCYaj4VN.mjs +1 -0
- package/website/dist/_worker.js/chunks/shaderlab_CAcRkg1_.mjs +1 -0
- package/website/dist/_worker.js/chunks/shellscript_BWwhkDVh.mjs +1 -0
- package/website/dist/_worker.js/chunks/shellsession_BfEA3juK.mjs +1 -0
- package/website/dist/_worker.js/chunks/slack-dark_CL3lSpCc.mjs +1 -0
- package/website/dist/_worker.js/chunks/slack-ochin_DdZKOQVh.mjs +1 -0
- package/website/dist/_worker.js/chunks/smalltalk_DgilzSui.mjs +1 -0
- package/website/dist/_worker.js/chunks/snazzy-light_eJU08Pz_.mjs +1 -0
- package/website/dist/_worker.js/chunks/solarized-dark_Dg_YQywx.mjs +1 -0
- package/website/dist/_worker.js/chunks/solarized-light_BnIsrA6p.mjs +1 -0
- package/website/dist/_worker.js/chunks/solidity_DkseH8pQ.mjs +1 -0
- package/website/dist/_worker.js/chunks/soy_DU7bOYoG.mjs +1 -0
- package/website/dist/_worker.js/chunks/sparql_BuI1DBDH.mjs +1 -0
- package/website/dist/_worker.js/chunks/splunk_B8Ha9Pkg.mjs +1 -0
- package/website/dist/_worker.js/chunks/sql_BniHwea5.mjs +1 -0
- package/website/dist/_worker.js/chunks/ssh-config_CkE1GuVe.mjs +1 -0
- package/website/dist/_worker.js/chunks/stata_Dtqpbd_l.mjs +1 -0
- package/website/dist/_worker.js/chunks/stylus_CXTtglzO.mjs +1 -0
- package/website/dist/_worker.js/chunks/svelte_BjWYcUCN.mjs +1 -0
- package/website/dist/_worker.js/chunks/swift_BzHql_rM.mjs +1 -0
- package/website/dist/_worker.js/chunks/synthwave-84_DLRNhxNA.mjs +1 -0
- package/website/dist/_worker.js/chunks/system-verilog_ChyInPph.mjs +1 -0
- package/website/dist/_worker.js/chunks/systemd_Bi9Qa2qD.mjs +1 -0
- package/website/dist/_worker.js/chunks/talonscript_B3sH_Y-V.mjs +1 -0
- package/website/dist/_worker.js/chunks/tasl_BJ5yipRs.mjs +1 -0
- package/website/dist/_worker.js/chunks/tcl_CoJQjNoP.mjs +1 -0
- package/website/dist/_worker.js/chunks/templ_CrU7Ffil.mjs +1 -0
- package/website/dist/_worker.js/chunks/terraform_DT9JSFpC.mjs +1 -0
- package/website/dist/_worker.js/chunks/tex_5PKu2yA0.mjs +1 -0
- package/website/dist/_worker.js/chunks/tokyo-night_Buo8OK7-.mjs +1 -0
- package/website/dist/_worker.js/chunks/toml_CPuXX3oc.mjs +1 -0
- package/website/dist/_worker.js/chunks/ts-tags_D0M_1VSH.mjs +1 -0
- package/website/dist/_worker.js/chunks/tsv_CuivVNot.mjs +1 -0
- package/website/dist/_worker.js/chunks/tsx_MkuGr8MY.mjs +1 -0
- package/website/dist/_worker.js/chunks/turtle_BqgEPK7f.mjs +1 -0
- package/website/dist/_worker.js/chunks/twig_r1G9rpYJ.mjs +1 -0
- package/website/dist/_worker.js/chunks/typescript_Au5buqzM.mjs +1 -0
- package/website/dist/_worker.js/chunks/typespec_47rhBK_z.mjs +1 -0
- package/website/dist/_worker.js/chunks/typst_BAtuQLh-.mjs +1 -0
- package/website/dist/_worker.js/chunks/v_BIvWImHg.mjs +1 -0
- package/website/dist/_worker.js/chunks/vala_DYEacj30.mjs +1 -0
- package/website/dist/_worker.js/chunks/vb_CikQuqGJ.mjs +1 -0
- package/website/dist/_worker.js/chunks/verilog_BQRENwI-.mjs +1 -0
- package/website/dist/_worker.js/chunks/vesper_DA0kvTmj.mjs +1 -0
- package/website/dist/_worker.js/chunks/vhdl_DHscJIyg.mjs +1 -0
- package/website/dist/_worker.js/chunks/viml_F2pvMwvG.mjs +1 -0
- package/website/dist/_worker.js/chunks/vitesse-black_D9tjNzd0.mjs +1 -0
- package/website/dist/_worker.js/chunks/vitesse-dark_Bnm5d0hd.mjs +1 -0
- package/website/dist/_worker.js/chunks/vitesse-light_CHwbyjNR.mjs +1 -0
- package/website/dist/_worker.js/chunks/vue-html_DyYtbbMK.mjs +1 -0
- package/website/dist/_worker.js/chunks/vue_DofN6juy.mjs +1 -0
- package/website/dist/_worker.js/chunks/vyper_CiR0m-OV.mjs +1 -0
- package/website/dist/_worker.js/chunks/wasm_CwIGgRGf.mjs +1 -0
- package/website/dist/_worker.js/chunks/wasm_jKWhg0J0.mjs +1 -0
- package/website/dist/_worker.js/chunks/wenyan_DKvVZKXW.mjs +1 -0
- package/website/dist/_worker.js/chunks/wgsl_BOWZY7yw.mjs +1 -0
- package/website/dist/_worker.js/chunks/wikitext_CXDhhHPy.mjs +1 -0
- package/website/dist/_worker.js/chunks/wolfram_ChkmGnW0.mjs +1 -0
- package/website/dist/_worker.js/chunks/xml_DXH3hHIu.mjs +1 -0
- package/website/dist/_worker.js/chunks/xsl_DuP2mFjg.mjs +1 -0
- package/website/dist/_worker.js/chunks/yaml_IGiEkTge.mjs +1 -0
- package/website/dist/_worker.js/chunks/zenscript_59iXGyNw.mjs +1 -0
- package/website/dist/_worker.js/chunks/zig_DKzb0zdT.mjs +1 -0
- package/website/dist/_worker.js/index.js +53 -0
- package/website/dist/_worker.js/manifest_BAAoOzaU.mjs +98 -0
- package/website/dist/_worker.js/pages/_image.astro.mjs +24 -0
- package/website/dist/_worker.js/pages/agents.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/animation.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/api/raw-markdown/_---path_.astro.mjs +44 -0
- package/website/dist/_worker.js/pages/config.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/fonts.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/getting-started.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/helpers.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/images.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/index.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/llm.txt.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/preview.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/sdk.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/sitemap.xml.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/styling.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/templates.astro.mjs +1 -0
- package/website/dist/_worker.js/pages/video.astro.mjs +1 -0
- package/website/dist/_worker.js/renderers.mjs +57 -0
- package/website/dist/agents/index.html +3 -2
- package/website/dist/animation/index.html +402 -128
- package/website/dist/config/index.html +184 -0
- package/website/dist/fonts/index.html +56 -52
- package/website/dist/getting-started/index.html +107 -0
- package/website/dist/helpers/index.html +8 -8
- package/website/dist/images/index.html +50 -23
- package/website/dist/index.html +114 -148
- package/website/dist/llm.txt +751 -1055
- package/website/dist/preview/index.html +111 -0
- package/website/dist/robots.txt +35 -0
- package/website/dist/sdk/index.html +390 -52
- package/website/dist/sitemap.xml +76 -0
- package/website/dist/styling/index.html +10 -7
- package/website/dist/templates/index.html +11 -59
- package/website/dist/video/index.html +106 -537
- package/website/package-lock.json +1077 -17
- package/website/templates/og-image.tsx +61 -0
- package/website/dist/_astro/agents.I1-fN38o.css +0 -1
|
@@ -1,40 +1,78 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><meta name="generator" content="Astro v4.16.19"><link rel="canonical" href="https://loopwind.dev/animation/"><!-- Primary Meta Tags --><title></title><meta name="title"><meta name="description" content="CLI-based Image & Video Generator for developers and AI Agents. Generate stunning visuals from React + Tailwind templates."><meta name="keywords" content="loopwind, image generation, video generation, React, Tailwind CSS, Satori, CLI tool, templates, shadcn/ui, AI agents, Cursor, automation"><meta name="author" content="loopwind"><!-- Open Graph / Facebook --><meta property="og:type" content="website"><meta property="og:url" content="https://loopwind.dev/animation/"><meta property="og:title"><meta property="og:description" content="CLI-based Image & Video Generator for developers and AI Agents. Generate stunning visuals from React + Tailwind templates."><meta property="og:image" content="https://loopwind.dev/og
|
|
2
|
-
<
|
|
1
|
+
<!DOCTYPE html><html lang="en" data-astro-cid-mw7aashj> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><meta name="generator" content="Astro v4.16.19"><link rel="canonical" href="https://loopwind.dev/animation/"><!-- Primary Meta Tags --><title></title><meta name="title"><meta name="description" content="CLI-based Image & Video Generator for developers and AI Agents. Generate stunning visuals from React + Tailwind templates."><meta name="keywords" content="loopwind, image generation, video generation, React, Tailwind CSS, Satori, CLI tool, templates, shadcn/ui, AI agents, Cursor, automation, serverless, WASM, Open Graph, social media, marketing automation"><meta name="author" content="loopwind"><!-- Open Graph / Facebook --><meta property="og:type" content="website"><meta property="og:url" content="https://loopwind.dev/animation/"><meta property="og:title"><meta property="og:description" content="CLI-based Image & Video Generator for developers and AI Agents. Generate stunning visuals from React + Tailwind templates."><meta property="og:image" content="https://loopwind.dev/api/og/animation"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><meta property="og:image:alt"><meta property="og:site_name" content="loopwind"><meta property="og:locale" content="en_US"><!-- Twitter --><meta name="twitter:card" content="summary_large_image"><meta name="twitter:url" content="https://loopwind.dev/animation/"><meta name="twitter:title"><meta name="twitter:description" content="CLI-based Image & Video Generator for developers and AI Agents. Generate stunning visuals from React + Tailwind templates."><meta name="twitter:image" content="https://loopwind.dev/api/og/animation"><meta name="twitter:image:alt"><meta name="twitter:creator" content="@loopwind"><meta name="twitter:site" content="@loopwind"><!-- Theme Color --><meta name="theme-color" content="#0a0a0a"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a0a0a"><meta name="theme-color" media="(prefers-color-scheme: light)" content="#fafafa"><!-- Additional SEO --><meta name="robots" content="index, follow"><meta name="googlebot" content="index, follow"><meta name="language" content="English"><meta name="revisit-after" content="7 days"><meta name="rating" content="general"><!-- Mobile Web App --><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta name="apple-mobile-web-app-title" content="loopwind"><!-- Structured Data (JSON-LD) --><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"loopwind","applicationCategory":"DeveloperApplication","operatingSystem":"Cross-platform","description":"CLI-based Image & Video Generator for developers and AI Agents. Generate stunning visuals from React + Tailwind templates.","url":"https://loopwind.dev/","author":{"@type":"Organization","name":"loopwind","url":"https://loopwind.dev/"},"offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"softwareVersion":"0.11.0","releaseNotes":"https://github.com/loopwind/loopwind/releases","screenshot":"https://loopwind.dev/api/og/animation","featureList":["Image generation from React templates","Video generation with animations","Tailwind CSS support","shadcn/ui design system","CLI-based workflow","Serverless rendering","TypeScript support","AI Agent friendly"]}</script><script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"loopwind","url":"https://loopwind.dev/","logo":"https://loopwind.dev/favicon.svg","sameAs":["https://github.com/loopwind/loopwind","https://www.npmjs.com/package/loopwind"]}</script><script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://loopwind.dev/"},{"@type":"ListItem","position":2,"name":"Animation","item":"https://loopwind.dev/animation"}]}</script><link rel="stylesheet" href="/_astro/agents.Yx-L_igG.css"><script type="module">const p=document.getElementById("mobile-menu-button"),l=document.getElementById("mobile-menu"),g=document.querySelectorAll(".mobile-menu-link");p?.addEventListener("click",()=>{l?.classList.toggle("hidden")});l?.addEventListener("click",o=>{o.target===l&&l.classList.add("hidden")});g.forEach(o=>{o.addEventListener("click",()=>{l?.classList.add("hidden")})});function m(){const o=document.getElementById("toc-nav");if(!o){console.log("TOC: No toc-nav element found");return}const n=document.querySelector("article");if(!n){console.log("TOC: No article element found");return}const c=n.querySelectorAll("h2, h3");if(c.length===0){console.log("TOC: No headings found");return}console.log(`TOC: Found ${c.length} headings`);const a=document.createElement("ul");a.className="space-y-0 text-sm border-l border-border/50",c.forEach(e=>{const t=e.tagName==="H2"?2:3,r=e.id||e.textContent?.toLowerCase().replace(/[^\w]+/g,"-");!e.id&&r&&(e.id=r);const s=document.createElement("li"),d=document.createElement("a");d.href=`#${r}`,d.textContent=e.textContent,d.className=`toc-link block py-1 px-3 -ml-px border-l-2 border-transparent transition-all no-underline ${t===3?"pl-6 text-xs text-muted-foreground/70":"text-sm text-muted-foreground"} hover:text-foreground hover:border-muted-foreground/50`,s.appendChild(d),a.appendChild(s)}),o.appendChild(a);const i=new IntersectionObserver(e=>{e.forEach(t=>{const r=t.target.id,s=o.querySelector(`a[href="#${r}"]`);t.isIntersecting&&(document.querySelectorAll(".toc-link").forEach(d=>{d.classList.remove("text-foreground","border-accent","font-medium")}),s?.classList.add("text-foreground","border-accent","font-medium"))})},{rootMargin:"-100px 0px -66%",threshold:0});c.forEach(e=>{i.observe(e)})}document.addEventListener("DOMContentLoaded",m);document.addEventListener("astro:page-load",m);function u(){const o=document.getElementById("copy-to-llm-btn"),n=document.getElementById("copy-btn-text");if(!o||!n){console.log("Copy to LLM: Button not found on this page");return}console.log("Copy to LLM: Initialized"),o.addEventListener("click",async()=>{const c=window.location.pathname,a=c.replace(/^\//,"").replace(/\/$/,""),e=`/api/raw-markdown/${a===""?"index":a}`;console.log("Copy to LLM clicked: pathname=",c,"apiUrl=",e);try{n.textContent="Copying...";const t=await fetch(e);if(console.log("Response status:",t.status),!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const r=await t.text();console.log("Got markdown, length:",r.length),await navigator.clipboard.writeText(r),n.textContent="Copied!",setTimeout(()=>{n.textContent="Copy to LLM"},2e3)}catch(t){console.error("Copy failed:",t),n.textContent="Failed",setTimeout(()=>{n.textContent="Copy to LLM"},2e3)}})}document.addEventListener("DOMContentLoaded",u);document.addEventListener("astro:page-load",u);
|
|
2
|
+
</script></head> <body class="antialiased" data-astro-cid-mw7aashj> <div class="min-h-screen" data-astro-cid-mw7aashj> <!-- Mobile Header --> <header class="mobile-header fixed top-0 left-0 right-0 h-16 bg-card border-b border-border z-50 md:hidden" data-astro-cid-mw7aashj> <div class="flex items-center justify-between h-full px-4" data-astro-cid-mw7aashj> <a href="/" class="no-underline"> <h1 class="text-xl flex items-center gap-2 bg-linear-to-r from-brand-from to-brand-to bg-clip-text text-transparent"> <span class="text-2xl">➰</span> <span>loopwind</span> </h1> </a> <button id="mobile-menu-button" class="p-2 text-foreground hover:bg-accent rounded-md transition-colors" aria-label="Toggle menu" data-astro-cid-mw7aashj> <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-astro-cid-mw7aashj> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" data-astro-cid-mw7aashj></path> </svg> </button> </div> </header> <!-- Mobile Menu Overlay --> <div id="mobile-menu" class="mobile-menu fixed inset-0 bg-background/80 backdrop-blur-sm z-40 md:hidden hidden" data-astro-cid-mw7aashj> <div class="fixed top-0 left-0 h-screen w-64 bg-card border-r border-border overflow-y-auto" data-astro-cid-mw7aashj> <div class="p-6 pt-20" data-astro-cid-mw7aashj> <nav data-astro-cid-mw7aashj> <ul class="space-y-1" data-astro-cid-mw7aashj> <li data-astro-cid-mw7aashj> <a href="/" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Home </a> </li><li data-astro-cid-mw7aashj> <a href="/getting-started" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Getting Started </a> </li><li data-astro-cid-mw7aashj> <a href="/templates" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Templates </a> </li><li data-astro-cid-mw7aashj> <a href="/images" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Images </a> </li><li data-astro-cid-mw7aashj> <a href="/video" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Video </a> </li><li data-astro-cid-mw7aashj> <a href="/preview" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Preview </a> </li><li data-astro-cid-mw7aashj> <a href="/animation" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Animation </a> </li><li data-astro-cid-mw7aashj> <a href="/helpers" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Helpers </a> </li><li data-astro-cid-mw7aashj> <a href="/styling" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Styling </a> </li><li data-astro-cid-mw7aashj> <a href="/fonts" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Fonts </a> </li><li data-astro-cid-mw7aashj> <a href="/config" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> loopwind.json </a> </li><li data-astro-cid-mw7aashj> <a href="/sdk" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> SDK </a> </li><li data-astro-cid-mw7aashj> <a href="/agents" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Use with AI Agents </a> </li><li data-astro-cid-mw7aashj> <a href="/llm.txt" class="mobile-menu-link block px-3 py-2 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> llm.txt ⇱ </a> </li> </ul> </nav> </div> </div> </div> <!-- Desktop Sidebar --> <aside class="desktop-sidebar fixed top-0 left-0 h-screen w-64 border-r border-border bg-card overflow-y-auto z-10" data-astro-cid-mw7aashj> <div class="p-6" data-astro-cid-mw7aashj> <div class="block mb-3" data-astro-cid-mw7aashj> <a href="/" class="no-underline"> <h1 class="text-3xl flex items-center gap-2 bg-linear-to-r from-brand-from to-brand-to bg-clip-text text-transparent"> <span class="text-4xl">➰</span> <span>loopwind</span> </h1> </a> </div> <nav data-astro-cid-mw7aashj> <ul class="space-y-0" data-astro-cid-mw7aashj> <li data-astro-cid-mw7aashj> <a href="/" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Home </a> </li><li data-astro-cid-mw7aashj> <a href="/getting-started" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Getting Started </a> </li><li data-astro-cid-mw7aashj> <a href="/templates" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Templates </a> </li><li data-astro-cid-mw7aashj> <a href="/images" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Images </a> </li><li data-astro-cid-mw7aashj> <a href="/video" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Video </a> </li><li data-astro-cid-mw7aashj> <a href="/preview" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Preview </a> </li><li data-astro-cid-mw7aashj> <a href="/animation" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Animation </a> </li><li data-astro-cid-mw7aashj> <a href="/helpers" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Helpers </a> </li><li data-astro-cid-mw7aashj> <a href="/styling" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Styling </a> </li><li data-astro-cid-mw7aashj> <a href="/fonts" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Fonts </a> </li><li data-astro-cid-mw7aashj> <a href="/config" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> loopwind.json </a> </li><li data-astro-cid-mw7aashj> <a href="/sdk" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> SDK </a> </li><li data-astro-cid-mw7aashj> <a href="/agents" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> Use with AI Agents </a> </li><li data-astro-cid-mw7aashj> <a href="/llm.txt" class="block px-3 py-1.5 rounded-md text-sm transition-colors no-underline text-muted-foreground hover:text-foreground hover:bg-accent/50" data-astro-cid-mw7aashj> llm.txt ⇱ </a> </li> </ul> </nav> </div> </aside> <!-- Main content --> <main class="ml-64 mr-64" data-astro-cid-mw7aashj> <div class="p-12" data-astro-cid-mw7aashj> <button id="copy-to-llm-btn" class="mb-6 px-4 py-2 bg-accent hover:bg-accent/80 text-accent-foreground rounded-md text-sm font-medium transition-colors flex items-center gap-2" aria-label="Copy raw markdown to clipboard" data-astro-cid-mw7aashj> <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-astro-cid-mw7aashj> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" data-astro-cid-mw7aashj></path> </svg> <span id="copy-btn-text" data-astro-cid-mw7aashj>Copy to LLM</span> </button> <article class="prose prose-invert max-w-4xl" data-astro-cid-mw7aashj> <h1 id="animation">Animation</h1>
|
|
3
|
+
<p>loopwind provides <strong>Tailwind-style animation classes</strong> that work with time to create smooth video animations without writing custom code.</p>
|
|
3
4
|
<blockquote>
|
|
4
|
-
<p><strong>Note:</strong> Animation classes only work with <strong>video templates</strong> and <strong>GIFs</strong>. For static images, animations will have no effect since there’s no
|
|
5
|
+
<p><strong>Note:</strong> Animation classes only work with <strong>video templates</strong> and <strong>GIFs</strong>. For static images, animations will have no effect since there’s no time context.</p>
|
|
5
6
|
</blockquote>
|
|
6
7
|
<h2 id="quick-start">Quick Start</h2>
|
|
7
8
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> MyVideo</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">subtitle</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
8
9
|
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
9
10
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex flex-col items-center justify-center w-full h-full bg-black'</span><span style="color:#E1E4E8">)}></span></span>
|
|
10
|
-
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Bounce in from below
|
|
11
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold text-white ease-out
|
|
11
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Bounce in from below: starts at 0, lasts 400ms */</span><span style="color:#E1E4E8">}</span></span>
|
|
12
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold text-white ease-out enter-bounce-in-up/0/400'</span><span style="color:#E1E4E8">)}></span></span>
|
|
12
13
|
<span class="line"><span style="color:#E1E4E8"> {title}</span></span>
|
|
13
14
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
14
15
|
<span class="line"></span>
|
|
15
|
-
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Fade in with upward motion
|
|
16
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">p</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-2xl text-white/80 mt-4 ease-out
|
|
16
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Fade in with upward motion: starts at 300ms, lasts 400ms */</span><span style="color:#E1E4E8">}</span></span>
|
|
17
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">p</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-2xl text-white/80 mt-4 ease-out enter-fade-in-up/300/400'</span><span style="color:#E1E4E8">)}></span></span>
|
|
17
18
|
<span class="line"><span style="color:#E1E4E8"> {subtitle}</span></span>
|
|
18
19
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">p</span><span style="color:#E1E4E8">></span></span>
|
|
20
|
+
<span class="line"></span>
|
|
21
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Continuous floating animation: repeats every 1s (1000ms) */</span><span style="color:#E1E4E8">}</span></span>
|
|
22
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'mt-8 text-4xl loop-float/1000'</span><span style="color:#E1E4E8">)}></span></span>
|
|
23
|
+
<span class="line"><span style="color:#E1E4E8"> ⬇️</span></span>
|
|
24
|
+
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
19
25
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
20
26
|
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
21
27
|
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
22
28
|
<span class="line"></span></code></pre>
|
|
23
|
-
<h2 id="
|
|
24
|
-
<p>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
<h2 id="animation-format">Animation Format</h2>
|
|
30
|
+
<p>loopwind uses three types of animations with <strong>millisecond timing</strong>:</p>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<table><thead><tr><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td><code>enter-{type}/{start}/{duration}</code></td><td>Animations that play when entering</td></tr><tr><td>Exit</td><td><code>exit-{type}/{start}/{duration}</code></td><td>Animations that play when exiting</td></tr><tr><td>Loop</td><td><code>loop-{type}/{duration}</code></td><td>Continuous looping animations</td></tr></tbody></table>
|
|
57
|
+
<p>All timing values are in <strong>milliseconds</strong> (1000ms = 1 second).</p>
|
|
58
|
+
<h2 id="utility-based-animations">Utility-Based Animations</h2>
|
|
59
|
+
<p>In addition to predefined animations, loopwind supports <strong>Tailwind utility-based animations</strong> that let you animate any transform or opacity property directly:</p>
|
|
60
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Slide in 20px from the left</span></span>
|
|
61
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-x-5/0/1000'</span><span style="color:#E1E4E8">)}>Content</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
62
|
+
<span class="line"></span>
|
|
63
|
+
<span class="line"><span style="color:#6A737D">// Rotate 90 degrees on entrance</span></span>
|
|
64
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-rotate-90/0/500'</span><span style="color:#E1E4E8">)}>Spinning</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
34
65
|
<span class="line"></span>
|
|
35
|
-
<span class="line"><span style="color:#6A737D">// Fade
|
|
36
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">
|
|
66
|
+
<span class="line"><span style="color:#6A737D">// Fade to 50% opacity in a loop</span></span>
|
|
67
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-opacity-50/1000'</span><span style="color:#E1E4E8">)}>Pulsing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
68
|
+
<span class="line"></span>
|
|
69
|
+
<span class="line"><span style="color:#6A737D">// Scale down with negative value</span></span>
|
|
70
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter--scale-50/0/800'</span><span style="color:#E1E4E8">)}>Shrinking</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
37
71
|
<span class="line"></span></code></pre>
|
|
72
|
+
<h3 id="supported-utilities">Supported Utilities</h3>
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
38
76
|
|
|
39
77
|
|
|
40
78
|
|
|
@@ -84,14 +122,173 @@
|
|
|
84
122
|
|
|
85
123
|
|
|
86
124
|
|
|
87
|
-
|
|
125
|
+
|
|
126
|
+
<table><thead><tr><th>Utility</th><th>Format</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><strong>translate-x</strong></td><td><code>enter-translate-x-{value}</code></td><td>Translate horizontally</td><td><code>enter-translate-x-5</code> = 20px<br/><code>enter-translate-x-full</code> = 100%<br/><code>enter-translate-x-[20px]</code> = 20px</td></tr><tr><td><strong>translate-y</strong></td><td><code>enter-translate-y-{value}</code></td><td>Translate vertically</td><td><code>loop-translate-y-10</code> = 40px<br/><code>enter-translate-y-1/2</code> = 50%<br/><code>enter-translate-y-[5rem]</code> = 80px</td></tr><tr><td><strong>opacity</strong></td><td><code>enter-opacity-{n}</code></td><td>Set opacity (0-100)</td><td><code>enter-opacity-50</code> = 50%</td></tr><tr><td><strong>scale</strong></td><td><code>enter-scale-{n}</code></td><td>Scale element (0-200)</td><td><code>enter-scale-100</code> = 1.0x</td></tr><tr><td><strong>rotate</strong></td><td><code>enter-rotate-{n}</code></td><td>Rotate in degrees</td><td><code>enter-rotate-45</code> = 45°</td></tr><tr><td><strong>skew-x</strong></td><td><code>enter-skew-x-{n}</code></td><td>Skew on X axis in degrees</td><td><code>enter-skew-x-12</code> = 12°</td></tr><tr><td><strong>skew-y</strong></td><td><code>enter-skew-y-{n}</code></td><td>Skew on Y axis in degrees</td><td><code>exit-skew-y-6</code> = 6°</td></tr></tbody></table>
|
|
127
|
+
<p><strong>Translate value formats:</strong></p>
|
|
128
|
+
<ul>
|
|
129
|
+
<li><strong>Numeric</strong>: <code>5</code> = 20px (Tailwind spacing scale: 1 unit = 4px)</li>
|
|
130
|
+
<li><strong>Keywords</strong>: <code>full</code> = 100%</li>
|
|
131
|
+
<li><strong>Fractions</strong>: <code>1/2</code> = 50%, <code>1/3</code> = 33.333%, <code>2/3</code> = 66.666%, etc.</li>
|
|
132
|
+
<li><strong>Arbitrary values</strong>: <code>[20px]</code>, <code>[5rem]</code>, <code>[10%]</code> (rem converts to px: 1rem = 16px)</li>
|
|
133
|
+
</ul>
|
|
134
|
+
<p>All utilities work with:</p>
|
|
135
|
+
<ul>
|
|
136
|
+
<li><strong>All prefixes</strong>: <code>enter-</code>, <code>exit-</code>, <code>loop-</code>, <code>animate-</code></li>
|
|
137
|
+
<li><strong>Negative values</strong>: Prefix with <code>-</code> (e.g., <code>-translate-x-5</code>, <code>-rotate-45</code>)</li>
|
|
138
|
+
<li><strong>Timing syntax</strong>: Add <code>/start/duration</code> (e.g., <code>enter-translate-x-5/0/800</code>)</li>
|
|
139
|
+
</ul>
|
|
140
|
+
<h3 id="translate-animations">Translate Animations</h3>
|
|
141
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Numeric (Tailwind spacing): 20px (5 * 4px)</span></span>
|
|
142
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-x-5/0/500'</span><span style="color:#E1E4E8">)}>Content</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
143
|
+
<span class="line"></span>
|
|
144
|
+
<span class="line"><span style="color:#6A737D">// Keyword: Full width (100%)</span></span>
|
|
145
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-y-full/0/800'</span><span style="color:#E1E4E8">)}>Dropping full height</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
146
|
+
<span class="line"></span>
|
|
147
|
+
<span class="line"><span style="color:#6A737D">// Fraction: Half width (50%)</span></span>
|
|
148
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-x-1/2/0/600'</span><span style="color:#E1E4E8">)}>Slide in halfway</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
149
|
+
<span class="line"></span>
|
|
150
|
+
<span class="line"><span style="color:#6A737D">// Arbitrary values: Exact px or rem</span></span>
|
|
151
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-y-[20px]/0/500'</span><span style="color:#E1E4E8">)}>Slide 20px</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
152
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-x-[5rem]/0/800'</span><span style="color:#E1E4E8">)}>Slide 5rem (80px)</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
153
|
+
<span class="line"></span>
|
|
154
|
+
<span class="line"><span style="color:#6A737D">// Loop with fractions</span></span>
|
|
155
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-translate-y-1/4/1000'</span><span style="color:#E1E4E8">)}>Oscillate 25%</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
156
|
+
<span class="line"></span>
|
|
157
|
+
<span class="line"><span style="color:#6A737D">// Negative values</span></span>
|
|
158
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'exit--translate-y-8/2000/500'</span><span style="color:#E1E4E8">)}>Rising</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
159
|
+
<span class="line"></span></code></pre>
|
|
160
|
+
<h3 id="opacity-animations">Opacity Animations</h3>
|
|
161
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Fade to 100% opacity</span></span>
|
|
162
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-opacity-100/0/500'</span><span style="color:#E1E4E8">)}>Fading In</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
163
|
+
<span class="line"></span>
|
|
164
|
+
<span class="line"><span style="color:#6A737D">// Fade to 50% opacity</span></span>
|
|
165
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-opacity-50/0/800'</span><span style="color:#E1E4E8">)}>Half Opacity</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
166
|
+
<span class="line"></span>
|
|
167
|
+
<span class="line"><span style="color:#6A737D">// Pulse between 50% and 100%</span></span>
|
|
168
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-opacity-50/1000'</span><span style="color:#E1E4E8">)}>Pulsing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
169
|
+
<span class="line"></span>
|
|
170
|
+
<span class="line"><span style="color:#6A737D">// Fade out to 0%</span></span>
|
|
171
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'exit-opacity-0/2500/500'</span><span style="color:#E1E4E8">)}>Vanishing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
172
|
+
<span class="line"></span></code></pre>
|
|
173
|
+
<h3 id="scale-animations">Scale Animations</h3>
|
|
174
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Scale from 0 to 100% (1.0x)</span></span>
|
|
175
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-scale-100/0/500'</span><span style="color:#E1E4E8">)}>Growing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
176
|
+
<span class="line"></span>
|
|
177
|
+
<span class="line"><span style="color:#6A737D">// Scale to 150% (1.5x)</span></span>
|
|
178
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-scale-150/0/800'</span><span style="color:#E1E4E8">)}>Enlarging</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
179
|
+
<span class="line"></span>
|
|
180
|
+
<span class="line"><span style="color:#6A737D">// Pulse scale in a loop</span></span>
|
|
181
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-scale-110/1000'</span><span style="color:#E1E4E8">)}>Breathing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
182
|
+
<span class="line"></span>
|
|
183
|
+
<span class="line"><span style="color:#6A737D">// Scale down to 50%</span></span>
|
|
184
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'exit-scale-50/2000/500'</span><span style="color:#E1E4E8">)}>Shrinking</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
185
|
+
<span class="line"></span></code></pre>
|
|
186
|
+
<h3 id="rotate-animations">Rotate Animations</h3>
|
|
187
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Rotate 90 degrees</span></span>
|
|
188
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-rotate-90/0/500'</span><span style="color:#E1E4E8">)}>Quarter Turn</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
189
|
+
<span class="line"></span>
|
|
190
|
+
<span class="line"><span style="color:#6A737D">// Rotate 180 degrees</span></span>
|
|
191
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-rotate-180/0/1000'</span><span style="color:#E1E4E8">)}>Half Turn</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
192
|
+
<span class="line"></span>
|
|
193
|
+
<span class="line"><span style="color:#6A737D">// Continuous rotation in loop (360 degrees per cycle)</span></span>
|
|
194
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-rotate-360/2000'</span><span style="color:#E1E4E8">)}>Spinning</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
195
|
+
<span class="line"></span>
|
|
196
|
+
<span class="line"><span style="color:#6A737D">// Rotate backwards with negative value</span></span>
|
|
197
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter--rotate-45/0/500'</span><span style="color:#E1E4E8">)}>Counter Rotation</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
198
|
+
<span class="line"></span></code></pre>
|
|
199
|
+
<h3 id="skew-animations">Skew Animations</h3>
|
|
200
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Skew on X axis</span></span>
|
|
201
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-skew-x-12/0/500'</span><span style="color:#E1E4E8">)}>Slanted</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
202
|
+
<span class="line"></span>
|
|
203
|
+
<span class="line"><span style="color:#6A737D">// Skew on Y axis</span></span>
|
|
204
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-skew-y-6/0/800'</span><span style="color:#E1E4E8">)}>Tilted</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
205
|
+
<span class="line"></span>
|
|
206
|
+
<span class="line"><span style="color:#6A737D">// Oscillating skew in loop</span></span>
|
|
207
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-skew-x-6/1000'</span><span style="color:#E1E4E8">)}>Wobbling</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
208
|
+
<span class="line"></span>
|
|
209
|
+
<span class="line"><span style="color:#6A737D">// Negative skew</span></span>
|
|
210
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'exit--skew-x-12/2000/500'</span><span style="color:#E1E4E8">)}>Reverse Slant</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
211
|
+
<span class="line"></span></code></pre>
|
|
212
|
+
<h3 id="combining-utilities">Combining Utilities</h3>
|
|
213
|
+
<p>You can combine multiple utility animations on the same element:</p>
|
|
214
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Translate and rotate together</span></span>
|
|
215
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-y-10/0/500 enter-rotate-45/0/500'</span><span style="color:#E1E4E8">)}></span></span>
|
|
216
|
+
<span class="line"><span style="color:#E1E4E8"> Flying In</span></span>
|
|
217
|
+
<span class="line"><span style="color:#E1E4E8"></</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
218
|
+
<span class="line"></span>
|
|
219
|
+
<span class="line"><span style="color:#6A737D">// Fade and scale</span></span>
|
|
220
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-opacity-100/0/800 enter-scale-100/0/800'</span><span style="color:#E1E4E8">)}></span></span>
|
|
221
|
+
<span class="line"><span style="color:#E1E4E8"> Appearing</span></span>
|
|
222
|
+
<span class="line"><span style="color:#E1E4E8"></</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
223
|
+
<span class="line"></span>
|
|
224
|
+
<span class="line"><span style="color:#6A737D">// Enter with translate, exit with rotation</span></span>
|
|
225
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-translate-x-5/0/500 exit-rotate-180/2500/500'</span><span style="color:#E1E4E8">)}></span></span>
|
|
226
|
+
<span class="line"><span style="color:#E1E4E8"> Slide and Spin</span></span>
|
|
227
|
+
<span class="line"><span style="color:#E1E4E8"></</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
228
|
+
<span class="line"></span></code></pre>
|
|
229
|
+
<h3 id="bracket-notation">Bracket Notation</h3>
|
|
230
|
+
<p>For more CSS-like syntax, you can use brackets with units:</p>
|
|
231
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Using bracket notation with seconds</span></span>
|
|
232
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-slide-up/[0.6s]/[1.5s]'</span><span style="color:#E1E4E8">)}>Hello</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
233
|
+
<span class="line"></span>
|
|
234
|
+
<span class="line"><span style="color:#6A737D">// Using bracket notation with milliseconds</span></span>
|
|
235
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-fade-in/[300ms]/[800ms]'</span><span style="color:#E1E4E8">)}>World</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
236
|
+
<span class="line"></span>
|
|
237
|
+
<span class="line"><span style="color:#6A737D">// Mix and match - plain numbers are milliseconds</span></span>
|
|
238
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-bounce-in/0/[1.2s]'</span><span style="color:#E1E4E8">)}>Mixed</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
239
|
+
<span class="line"></span></code></pre>
|
|
240
|
+
<h2 id="enter-animations">Enter Animations</h2>
|
|
241
|
+
<p>Format: <code>enter-{type}/{startMs}/{durationMs}</code></p>
|
|
242
|
+
<ul>
|
|
243
|
+
<li><code>startMs</code> - when the animation begins (milliseconds from start)</li>
|
|
244
|
+
<li><code>durationMs</code> - how long the animation lasts</li>
|
|
245
|
+
</ul>
|
|
246
|
+
<p>When values are omitted (<code>enter-fade-in</code>), it uses the full video duration.</p>
|
|
247
|
+
<h3 id="fade-animations">Fade Animations</h3>
|
|
248
|
+
<p>Simple opacity transitions with optional direction.</p>
|
|
249
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Fade in from 0ms to 500ms</span></span>
|
|
250
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-fade-in/0/500'</span><span style="color:#E1E4E8">)}>Hello</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
251
|
+
<span class="line"></span>
|
|
252
|
+
<span class="line"><span style="color:#6A737D">// Fade in with upward motion</span></span>
|
|
253
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-fade-in-up/0/600'</span><span style="color:#E1E4E8">)}>Hello</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
254
|
+
<span class="line"></span></code></pre>
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>enter-fade-in/0/500</code></td><td>Fade in (opacity 0 → 1)</td></tr><tr><td><code>enter-fade-in-up/0/500</code></td><td>Fade in + slide up (30px)</td></tr><tr><td><code>enter-fade-in-down/0/500</code></td><td>Fade in + slide down (30px)</td></tr><tr><td><code>enter-fade-in-left/0/500</code></td><td>Fade in + slide from left (30px)</td></tr><tr><td><code>enter-fade-in-right/0/500</code></td><td>Fade in + slide from right (30px)</td></tr></tbody></table>
|
|
88
285
|
<h3 id="slide-animations">Slide Animations</h3>
|
|
89
286
|
<p>Larger movement (100px) with fade.</p>
|
|
90
|
-
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Slide in from left</span></span>
|
|
91
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
287
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Slide in from left: starts at 0, lasts 500ms</span></span>
|
|
288
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-slide-left/0/500'</span><span style="color:#E1E4E8">)}>Content</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
92
289
|
<span class="line"></span>
|
|
93
|
-
<span class="line"><span style="color:#6A737D">// Slide up from bottom</span></span>
|
|
94
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
290
|
+
<span class="line"><span style="color:#6A737D">// Slide up from bottom: starts at 200ms, lasts 600ms</span></span>
|
|
291
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-slide-up/200/600'</span><span style="color:#E1E4E8">)}>Content</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
95
292
|
<span class="line"></span></code></pre>
|
|
96
293
|
|
|
97
294
|
|
|
@@ -118,14 +315,14 @@
|
|
|
118
315
|
|
|
119
316
|
|
|
120
317
|
|
|
121
|
-
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>
|
|
318
|
+
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>enter-slide-left/0/500</code></td><td>Slide in from left (100px)</td></tr><tr><td><code>enter-slide-right/0/500</code></td><td>Slide in from right (100px)</td></tr><tr><td><code>enter-slide-up/0/500</code></td><td>Slide in from bottom (100px)</td></tr><tr><td><code>enter-slide-down/0/500</code></td><td>Slide in from top (100px)</td></tr></tbody></table>
|
|
122
319
|
<h3 id="bounce-animations">Bounce Animations</h3>
|
|
123
320
|
<p>Playful entrance with overshoot effect.</p>
|
|
124
321
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Bounce in with scale overshoot</span></span>
|
|
125
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
322
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-bounce-in/0/500'</span><span style="color:#E1E4E8">)}>Bouncy!</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
126
323
|
<span class="line"></span>
|
|
127
324
|
<span class="line"><span style="color:#6A737D">// Bounce in from below</span></span>
|
|
128
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
325
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-bounce-in-up/0/600'</span><span style="color:#E1E4E8">)}>Pop!</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
129
326
|
<span class="line"></span></code></pre>
|
|
130
327
|
|
|
131
328
|
|
|
@@ -156,14 +353,14 @@
|
|
|
156
353
|
|
|
157
354
|
|
|
158
355
|
|
|
159
|
-
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>
|
|
356
|
+
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>enter-bounce-in/0/500</code></td><td>Bounce in with scale overshoot</td></tr><tr><td><code>enter-bounce-in-up/0/500</code></td><td>Bounce in from below</td></tr><tr><td><code>enter-bounce-in-down/0/500</code></td><td>Bounce in from above</td></tr><tr><td><code>enter-bounce-in-left/0/500</code></td><td>Bounce in from left</td></tr><tr><td><code>enter-bounce-in-right/0/500</code></td><td>Bounce in from right</td></tr></tbody></table>
|
|
160
357
|
<h3 id="scale--zoom-animations">Scale & Zoom Animations</h3>
|
|
161
358
|
<p>Size-based transitions.</p>
|
|
162
359
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Scale in from 50%</span></span>
|
|
163
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
360
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-scale-in/0/500'</span><span style="color:#E1E4E8">)}>Growing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
164
361
|
<span class="line"></span>
|
|
165
362
|
<span class="line"><span style="color:#6A737D">// Zoom in from 0%</span></span>
|
|
166
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
363
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-zoom-in/0/1000'</span><span style="color:#E1E4E8">)}>Zooming</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
167
364
|
<span class="line"></span></code></pre>
|
|
168
365
|
|
|
169
366
|
|
|
@@ -182,6 +379,15 @@
|
|
|
182
379
|
|
|
183
380
|
|
|
184
381
|
|
|
382
|
+
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>enter-scale-in/0/500</code></td><td>Scale up from 50% to 100%</td></tr><tr><td><code>enter-zoom-in/0/500</code></td><td>Zoom in from 0% to 100%</td></tr></tbody></table>
|
|
383
|
+
<h3 id="rotate--flip-animations">Rotate & Flip Animations</h3>
|
|
384
|
+
<p>Rotation-based transitions.</p>
|
|
385
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Rotate in 180 degrees</span></span>
|
|
386
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-rotate-in/0/500'</span><span style="color:#E1E4E8">)}>Spinning</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
387
|
+
<span class="line"></span>
|
|
388
|
+
<span class="line"><span style="color:#6A737D">// 3D flip on X axis</span></span>
|
|
389
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-flip-in-x/0/500'</span><span style="color:#E1E4E8">)}>Flipping</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
390
|
+
<span class="line"></span></code></pre>
|
|
185
391
|
|
|
186
392
|
|
|
187
393
|
|
|
@@ -190,14 +396,34 @@
|
|
|
190
396
|
|
|
191
397
|
|
|
192
398
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>enter-rotate-in/0/500</code></td><td>Rotate in from -180°</td></tr><tr><td><code>enter-flip-in-x/0/500</code></td><td>3D flip on horizontal axis</td></tr><tr><td><code>enter-flip-in-y/0/500</code></td><td>3D flip on vertical axis</td></tr></tbody></table>
|
|
413
|
+
<h2 id="exit-animations">Exit Animations</h2>
|
|
414
|
+
<p>Format: <code>exit-{type}/{startMs}/{durationMs}</code></p>
|
|
415
|
+
<ul>
|
|
416
|
+
<li><code>startMs</code> - when the exit animation begins</li>
|
|
417
|
+
<li><code>durationMs</code> - how long the exit animation lasts</li>
|
|
418
|
+
</ul>
|
|
419
|
+
<p>Exit animations use the same timing system but animate elements out.</p>
|
|
420
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Fade out starting at 2500ms, lasting 500ms (ends at 3000ms)</span></span>
|
|
421
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'exit-fade-out/2500/500'</span><span style="color:#E1E4E8">)}>Goodbye</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
198
422
|
<span class="line"></span>
|
|
199
|
-
<span class="line"><span style="color:#6A737D">//
|
|
200
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">
|
|
423
|
+
<span class="line"><span style="color:#6A737D">// Combined enter and exit on same element</span></span>
|
|
424
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'enter-fade-in/0/500 exit-fade-out/2500/500'</span><span style="color:#E1E4E8">)}></span></span>
|
|
425
|
+
<span class="line"><span style="color:#E1E4E8"> Hello and Goodbye</span></span>
|
|
426
|
+
<span class="line"><span style="color:#E1E4E8"></</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
201
427
|
<span class="line"></span></code></pre>
|
|
202
428
|
|
|
203
429
|
|
|
@@ -224,23 +450,76 @@
|
|
|
224
450
|
|
|
225
451
|
|
|
226
452
|
|
|
227
|
-
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>exit-fade-out/2500/500</code></td><td>Fade out (opacity 1 → 0)</td></tr><tr><td><code>exit-fade-out-up/2500/500</code></td><td>Fade out + slide up</td></tr><tr><td><code>exit-fade-out-down/2500/500</code></td><td>Fade out + slide down</td></tr><tr><td><code>exit-fade-out-left/2500/500</code></td><td>Fade out + slide left</td></tr><tr><td><code>exit-fade-out-right/2500/500</code></td><td>Fade out + slide right</td></tr><tr><td><code>exit-slide-up/2500/500</code></td><td>Slide out upward (100px)</td></tr><tr><td><code>exit-slide-down/2500/500</code></td><td>Slide out downward (100px)</td></tr><tr><td><code>exit-slide-left/2500/500</code></td><td>Slide out to left (100px)</td></tr><tr><td><code>exit-slide-right/2500/500</code></td><td>Slide out to right (100px)</td></tr><tr><td><code>exit-scale-out/2500/500</code></td><td>Scale out to 150%</td></tr><tr><td><code>exit-zoom-out/2500/500</code></td><td>Zoom out to 200%</td></tr><tr><td><code>exit-rotate-out/2500/500</code></td><td>Rotate out to 180°</td></tr><tr><td><code>exit-bounce-out/2500/500</code></td><td>Bounce out with scale</td></tr><tr><td><code>exit-bounce-out-up/2500/500</code></td><td>Bounce out upward</td></tr><tr><td><code>exit-bounce-out-down/2500/500</code></td><td>Bounce out downward</td></tr><tr><td><code>exit-bounce-out-left/2500/500</code></td><td>Bounce out to left</td></tr><tr><td><code>exit-bounce-out-right/2500/500</code></td><td>Bounce out to right</td></tr></tbody></table>
|
|
228
506
|
<h2 id="loop-animations">Loop Animations</h2>
|
|
229
|
-
<p>Format: <code>
|
|
230
|
-
<p>Loop animations repeat every <code>{
|
|
507
|
+
<p>Format: <code>loop-{type}/{durationMs}</code></p>
|
|
508
|
+
<p>Loop animations repeat every <code>{durationMs}</code> milliseconds:</p>
|
|
231
509
|
<ul>
|
|
232
|
-
<li><code>/
|
|
233
|
-
<li><code>/
|
|
234
|
-
<li><code>/
|
|
510
|
+
<li><code>/1000</code> = 1 second loop</li>
|
|
511
|
+
<li><code>/500</code> = 0.5 second loop</li>
|
|
512
|
+
<li><code>/2000</code> = 2 second loop</li>
|
|
235
513
|
</ul>
|
|
236
|
-
<
|
|
237
|
-
<
|
|
514
|
+
<p>When duration is omitted (<code>loop-bounce</code>), it defaults to 1000ms (1 second).</p>
|
|
515
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Pulse opacity every 500ms</span></span>
|
|
516
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-fade/500'</span><span style="color:#E1E4E8">)}>Pulsing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
238
517
|
<span class="line"></span>
|
|
239
|
-
<span class="line"><span style="color:#6A737D">// Bounce every
|
|
240
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
518
|
+
<span class="line"><span style="color:#6A737D">// Bounce every 800ms</span></span>
|
|
519
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-bounce/800'</span><span style="color:#E1E4E8">)}>Bouncing</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
241
520
|
<span class="line"></span>
|
|
242
|
-
<span class="line"><span style="color:#6A737D">// Full rotation every
|
|
243
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'
|
|
521
|
+
<span class="line"><span style="color:#6A737D">// Full rotation every 2000ms</span></span>
|
|
522
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'loop-spin/2000'</span><span style="color:#E1E4E8">)}>Spinning</</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
244
523
|
<span class="line"></span></code></pre>
|
|
245
524
|
|
|
246
525
|
|
|
@@ -275,20 +554,28 @@
|
|
|
275
554
|
|
|
276
555
|
|
|
277
556
|
|
|
278
|
-
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
<table><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><td><code>loop-fade/{ms}</code></td><td>Opacity pulse (0.5 → 1 → 0.5)</td></tr><tr><td><code>loop-bounce/{ms}</code></td><td>Bounce up and down</td></tr><tr><td><code>loop-spin/{ms}</code></td><td>Full 360° rotation</td></tr><tr><td><code>loop-ping/{ms}</code></td><td>Scale up + fade out (radar effect)</td></tr><tr><td><code>loop-wiggle/{ms}</code></td><td>Side to side wiggle</td></tr><tr><td><code>loop-float/{ms}</code></td><td>Gentle up and down floating</td></tr><tr><td><code>loop-pulse/{ms}</code></td><td>Scale pulse (1.0 → 1.05 → 1.0)</td></tr><tr><td><code>loop-shake/{ms}</code></td><td>Shake side to side</td></tr></tbody></table>
|
|
279
566
|
<h2 id="easing-functions">Easing Functions</h2>
|
|
280
567
|
<p>Add an easing class <strong>before</strong> the animation class to control the timing curve.</p>
|
|
281
568
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Ease in (accelerate)</span></span>
|
|
282
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-in
|
|
569
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-in enter-fade-in/0/1000'</span><span style="color:#E1E4E8">)}>Accelerating</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
283
570
|
<span class="line"></span>
|
|
284
571
|
<span class="line"><span style="color:#6A737D">// Ease out (decelerate) - default</span></span>
|
|
285
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out
|
|
572
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out enter-fade-in/0/1000'</span><span style="color:#E1E4E8">)}>Decelerating</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
286
573
|
<span class="line"></span>
|
|
287
574
|
<span class="line"><span style="color:#6A737D">// Ease in-out (smooth)</span></span>
|
|
288
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-in-out
|
|
575
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-in-out enter-fade-in/0/1000'</span><span style="color:#E1E4E8">)}>Smooth</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
289
576
|
<span class="line"></span>
|
|
290
577
|
<span class="line"><span style="color:#6A737D">// Strong cubic easing</span></span>
|
|
291
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out-cubic
|
|
578
|
+
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out-cubic enter-bounce-in/0/500'</span><span style="color:#E1E4E8">)}>Dramatic</</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
292
579
|
<span class="line"></span></code></pre>
|
|
293
580
|
|
|
294
581
|
|
|
@@ -351,23 +638,37 @@
|
|
|
351
638
|
|
|
352
639
|
|
|
353
640
|
<table><thead><tr><th>Class</th><th>Description</th><th>Best For</th></tr></thead><tbody><tr><td><code>linear</code></td><td>Constant speed</td><td>Mechanical motion</td></tr><tr><td><code>ease-in</code></td><td>Slow start, fast end</td><td>Exit animations</td></tr><tr><td><code>ease-out</code></td><td>Fast start, slow end (default)</td><td>Enter animations</td></tr><tr><td><code>ease-in-out</code></td><td>Slow start and end</td><td>Subtle transitions</td></tr><tr><td><code>ease-in-cubic</code></td><td>Strong slow start</td><td>Dramatic exits</td></tr><tr><td><code>ease-out-cubic</code></td><td>Strong fast start</td><td>Impactful entrances</td></tr><tr><td><code>ease-in-out-cubic</code></td><td>Strong both ends</td><td>Emphasis animations</td></tr><tr><td><code>ease-in-quart</code></td><td>Very strong slow start</td><td>Powerful exits</td></tr><tr><td><code>ease-out-quart</code></td><td>Very strong fast start</td><td>Punchy entrances</td></tr><tr><td><code>ease-in-out-quart</code></td><td>Very strong both ends</td><td>Maximum drama</td></tr></tbody></table>
|
|
641
|
+
<h2 id="combining-enter-and-exit">Combining Enter and Exit</h2>
|
|
642
|
+
<p>You can use both enter and exit animations on the same element:</p>
|
|
643
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> EnterExit</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
644
|
+
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
645
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex items-center justify-center w-full h-full bg-black'</span><span style="color:#E1E4E8">)}></span></span>
|
|
646
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Fade in during first 500ms, fade out during last 500ms (assuming 3s video) */</span><span style="color:#E1E4E8">}</span></span>
|
|
647
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold text-white enter-fade-in/0/500 exit-fade-out/2500/500'</span><span style="color:#E1E4E8">)}></span></span>
|
|
648
|
+
<span class="line"><span style="color:#E1E4E8"> {title}</span></span>
|
|
649
|
+
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
650
|
+
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
651
|
+
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
652
|
+
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
653
|
+
<span class="line"></span></code></pre>
|
|
654
|
+
<p>The opacities from multiple animations are <strong>multiplied together</strong>, so you get smooth transitions that combine properly.</p>
|
|
354
655
|
<h2 id="staggered-animations">Staggered Animations</h2>
|
|
355
|
-
<p>Create sequenced animations by offsetting
|
|
656
|
+
<p>Create sequenced animations by offsetting start times:</p>
|
|
356
657
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> StaggeredList</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">items</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
357
658
|
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
358
659
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex flex-col gap-4'</span><span style="color:#E1E4E8">)}></span></span>
|
|
359
|
-
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* First item:
|
|
360
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out
|
|
660
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* First item: starts at 0ms, lasts 300ms */</span><span style="color:#E1E4E8">}</span></span>
|
|
661
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out enter-fade-in-left/0/300'</span><span style="color:#E1E4E8">)}></span></span>
|
|
361
662
|
<span class="line"><span style="color:#E1E4E8"> {items[</span><span style="color:#79B8FF">0</span><span style="color:#E1E4E8">]}</span></span>
|
|
362
663
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
363
664
|
<span class="line"></span>
|
|
364
|
-
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Second item:
|
|
365
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out
|
|
665
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Second item: starts at 100ms, lasts 300ms */</span><span style="color:#E1E4E8">}</span></span>
|
|
666
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out enter-fade-in-left/100/300'</span><span style="color:#E1E4E8">)}></span></span>
|
|
366
667
|
<span class="line"><span style="color:#E1E4E8"> {items[</span><span style="color:#79B8FF">1</span><span style="color:#E1E4E8">]}</span></span>
|
|
367
668
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
368
669
|
<span class="line"></span>
|
|
369
|
-
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Third item:
|
|
370
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out
|
|
670
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Third item: starts at 200ms, lasts 300ms */</span><span style="color:#E1E4E8">}</span></span>
|
|
671
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'ease-out enter-fade-in-left/200/300'</span><span style="color:#E1E4E8">)}></span></span>
|
|
371
672
|
<span class="line"><span style="color:#E1E4E8"> {items[</span><span style="color:#79B8FF">2</span><span style="color:#E1E4E8">]}</span></span>
|
|
372
673
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
373
674
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
@@ -380,13 +681,13 @@
|
|
|
380
681
|
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
381
682
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex flex-col gap-4'</span><span style="color:#E1E4E8">)}></span></span>
|
|
382
683
|
<span class="line"><span style="color:#E1E4E8"> {items.</span><span style="color:#B392F0">map</span><span style="color:#E1E4E8">((</span><span style="color:#FFAB70">item</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">i</span><span style="color:#E1E4E8">) </span><span style="color:#F97583">=></span><span style="color:#E1E4E8"> {</span></span>
|
|
383
|
-
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> start</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> i </span><span style="color:#F97583">*</span><span style="color:#79B8FF">
|
|
384
|
-
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF">
|
|
684
|
+
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> start</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> i </span><span style="color:#F97583">*</span><span style="color:#79B8FF"> 100</span><span style="color:#E1E4E8">; </span><span style="color:#6A737D">// Each item starts 100ms later</span></span>
|
|
685
|
+
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> duration</span><span style="color:#F97583"> =</span><span style="color:#79B8FF"> 300</span><span style="color:#E1E4E8">; </span><span style="color:#6A737D">// Each animation lasts 300ms</span></span>
|
|
385
686
|
<span class="line"></span>
|
|
386
687
|
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
387
688
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span></span>
|
|
388
689
|
<span class="line"><span style="color:#B392F0"> key</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{i}</span></span>
|
|
389
|
-
<span class="line"><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">`ease-out
|
|
690
|
+
<span class="line"><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">`ease-out enter-fade-in-up/${</span><span style="color:#E1E4E8">start</span><span style="color:#9ECBFF">}/${</span><span style="color:#E1E4E8">duration</span><span style="color:#9ECBFF">}`</span><span style="color:#E1E4E8">)}</span></span>
|
|
390
691
|
<span class="line"><span style="color:#E1E4E8"> ></span></span>
|
|
391
692
|
<span class="line"><span style="color:#E1E4E8"> {item}</span></span>
|
|
392
693
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
@@ -396,33 +697,6 @@
|
|
|
396
697
|
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
397
698
|
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
398
699
|
<span class="line"></span></code></pre>
|
|
399
|
-
<h2 id="combining-animations">Combining Animations</h2>
|
|
400
|
-
<p>You can combine multiple animation classes. They will be applied together:</p>
|
|
401
|
-
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#6A737D">// Note: Multiple transforms will be combined</span></span>
|
|
402
|
-
<span class="line"><span style="color:#E1E4E8"><</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'animate-fade-in/0/0.5 animate-scale-in/0/0.5'</span><span style="color:#E1E4E8">)}></span></span>
|
|
403
|
-
<span class="line"><span style="color:#E1E4E8"> Fade + Scale</span></span>
|
|
404
|
-
<span class="line"><span style="color:#E1E4E8"></</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
405
|
-
<span class="line"></span></code></pre>
|
|
406
|
-
<p>For more complex combinations, use manual animation with <code>progress</code>:</p>
|
|
407
|
-
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> ComplexAnimation</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">progress</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
408
|
-
<span class="line"><span style="color:#6A737D"> // Custom compound animation</span></span>
|
|
409
|
-
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> opacity</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> Math.</span><span style="color:#B392F0">min</span><span style="color:#E1E4E8">(</span><span style="color:#79B8FF">1</span><span style="color:#E1E4E8">, progress </span><span style="color:#F97583">*</span><span style="color:#79B8FF"> 3</span><span style="color:#E1E4E8">);</span></span>
|
|
410
|
-
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> scale</span><span style="color:#F97583"> =</span><span style="color:#79B8FF"> 0.8</span><span style="color:#F97583"> +</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583">*</span><span style="color:#79B8FF"> 0.2</span><span style="color:#E1E4E8">;</span></span>
|
|
411
|
-
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> rotation</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> (</span><span style="color:#79B8FF">1</span><span style="color:#F97583"> -</span><span style="color:#E1E4E8"> progress) </span><span style="color:#F97583">*</span><span style="color:#F97583"> -</span><span style="color:#79B8FF">10</span><span style="color:#E1E4E8">;</span></span>
|
|
412
|
-
<span class="line"></span>
|
|
413
|
-
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
414
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex items-center justify-center w-full h-full'</span><span style="color:#E1E4E8">)}></span></span>
|
|
415
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{{</span></span>
|
|
416
|
-
<span class="line"><span style="color:#F97583"> ...</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold'</span><span style="color:#E1E4E8">),</span></span>
|
|
417
|
-
<span class="line"><span style="color:#E1E4E8"> opacity,</span></span>
|
|
418
|
-
<span class="line"><span style="color:#E1E4E8"> transform: </span><span style="color:#9ECBFF">`scale(${</span><span style="color:#E1E4E8">scale</span><span style="color:#9ECBFF">}) rotate(${</span><span style="color:#E1E4E8">rotation</span><span style="color:#9ECBFF">}deg)`</span></span>
|
|
419
|
-
<span class="line"><span style="color:#E1E4E8"> }}></span></span>
|
|
420
|
-
<span class="line"><span style="color:#E1E4E8"> {title}</span></span>
|
|
421
|
-
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
422
|
-
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
423
|
-
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
424
|
-
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
425
|
-
<span class="line"></span></code></pre>
|
|
426
700
|
<h2 id="common-patterns">Common Patterns</h2>
|
|
427
701
|
<h3 id="intro-sequence">Intro Sequence</h3>
|
|
428
702
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> IntroVideo</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">subtitle</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">logo</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
@@ -431,16 +705,16 @@
|
|
|
431
705
|
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Logo appears first */</span><span style="color:#E1E4E8">}</span></span>
|
|
432
706
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">img</span></span>
|
|
433
707
|
<span class="line"><span style="color:#B392F0"> src</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{logo}</span></span>
|
|
434
|
-
<span class="line"><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'h-20 mb-8 ease-out
|
|
708
|
+
<span class="line"><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'h-20 mb-8 ease-out enter-scale-in/0/300'</span><span style="color:#E1E4E8">)}</span></span>
|
|
435
709
|
<span class="line"><span style="color:#E1E4E8"> /></span></span>
|
|
436
710
|
<span class="line"></span>
|
|
437
711
|
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Title bounces in */</span><span style="color:#E1E4E8">}</span></span>
|
|
438
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-7xl font-bold text-white ease-out
|
|
712
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-7xl font-bold text-white ease-out enter-bounce-in-up/200/500'</span><span style="color:#E1E4E8">)}></span></span>
|
|
439
713
|
<span class="line"><span style="color:#E1E4E8"> {title}</span></span>
|
|
440
714
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
441
715
|
<span class="line"></span>
|
|
442
716
|
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Subtitle fades in last */</span><span style="color:#E1E4E8">}</span></span>
|
|
443
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">p</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-2xl text-white/80 mt-4 ease-out
|
|
717
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">p</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-2xl text-white/80 mt-4 ease-out enter-fade-in-up/400/700'</span><span style="color:#E1E4E8">)}></span></span>
|
|
444
718
|
<span class="line"><span style="color:#E1E4E8"> {subtitle}</span></span>
|
|
445
719
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">p</span><span style="color:#E1E4E8">></span></span>
|
|
446
720
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
@@ -454,7 +728,7 @@
|
|
|
454
728
|
<span class="line"><span style="color:#E1E4E8"> {words.</span><span style="color:#B392F0">split</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">' '</span><span style="color:#E1E4E8">).</span><span style="color:#B392F0">map</span><span style="color:#E1E4E8">((</span><span style="color:#FFAB70">word</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">i</span><span style="color:#E1E4E8">) </span><span style="color:#F97583">=></span><span style="color:#E1E4E8"> (</span></span>
|
|
455
729
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">span</span></span>
|
|
456
730
|
<span class="line"><span style="color:#B392F0"> key</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{i}</span></span>
|
|
457
|
-
<span class="line"><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">`text-4xl font-bold ease-out
|
|
731
|
+
<span class="line"><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">`text-4xl font-bold ease-out enter-fade-in-up/${</span><span style="color:#E1E4E8">i</span><span style="color:#F97583"> *</span><span style="color:#79B8FF"> 100</span><span style="color:#9ECBFF">}/200`</span><span style="color:#E1E4E8">)}</span></span>
|
|
458
732
|
<span class="line"><span style="color:#E1E4E8"> ></span></span>
|
|
459
733
|
<span class="line"><span style="color:#E1E4E8"> {word}</span></span>
|
|
460
734
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">span</span><span style="color:#E1E4E8">></span></span>
|
|
@@ -468,8 +742,8 @@
|
|
|
468
742
|
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
469
743
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'relative w-full h-full'</span><span style="color:#E1E4E8">)}></span></span>
|
|
470
744
|
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Floating background circles */</span><span style="color:#E1E4E8">}</span></span>
|
|
471
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'absolute top-10 left-10 w-20 h-20 rounded-full bg-white/10
|
|
472
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'absolute bottom-20 right-20 w-32 h-32 rounded-full bg-white/10
|
|
745
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'absolute top-10 left-10 w-20 h-20 rounded-full bg-white/10 loop-float/2000'</span><span style="color:#E1E4E8">)} /></span></span>
|
|
746
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'absolute bottom-20 right-20 w-32 h-32 rounded-full bg-white/10 loop-fade/1500'</span><span style="color:#E1E4E8">)} /></span></span>
|
|
473
747
|
<span class="line"></span>
|
|
474
748
|
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Main content */</span><span style="color:#E1E4E8">}</span></span>
|
|
475
749
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'relative z-10'</span><span style="color:#E1E4E8">)}></span></span>
|
|
@@ -479,19 +753,19 @@
|
|
|
479
753
|
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
480
754
|
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
481
755
|
<span class="line"></span></code></pre>
|
|
482
|
-
<h3 id="
|
|
483
|
-
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0">
|
|
756
|
+
<h3 id="full-enterexit-animation">Full Enter/Exit Animation</h3>
|
|
757
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> FullAnimation</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
484
758
|
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
485
759
|
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex items-center justify-center w-full h-full bg-black'</span><span style="color:#E1E4E8">)}></span></span>
|
|
486
|
-
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/*
|
|
487
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold text-white ease-in
|
|
760
|
+
<span class="line"><span style="color:#E1E4E8"> {</span><span style="color:#6A737D">/* Enter: starts at 0, lasts 400ms. Exit: starts at 2600ms, lasts 400ms */</span><span style="color:#E1E4E8">}</span></span>
|
|
761
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold text-white ease-out enter-bounce-in-up/0/400 exit-fade-out-up/2600/400'</span><span style="color:#E1E4E8">)}></span></span>
|
|
488
762
|
<span class="line"><span style="color:#E1E4E8"> {title}</span></span>
|
|
489
763
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
490
764
|
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
491
765
|
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
492
766
|
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
493
767
|
<span class="line"></span></code></pre>
|
|
494
|
-
<h2 id="
|
|
768
|
+
<h2 id="programmatic-animations">Programmatic Animations</h2>
|
|
495
769
|
<p>For complete control beyond animation classes, use <code>progress</code> and <code>frame</code> directly.</p>
|
|
496
770
|
<h3 id="available-props">Available Props</h3>
|
|
497
771
|
|
|
@@ -516,32 +790,11 @@
|
|
|
516
790
|
|
|
517
791
|
<table><thead><tr><th>Prop</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>progress</code></td><td><code>number</code></td><td>0 to 1 through the video (0% to 100%)</td></tr><tr><td><code>frame</code></td><td><code>number</code></td><td>Current frame number (0, 1, 2, … totalFrames-1)</td></tr></tbody></table>
|
|
518
792
|
<p>These are <strong>only available in video templates</strong>. Use them when animation classes aren’t flexible enough.</p>
|
|
519
|
-
<h3 id="using-progress">Using <code>progress</code></h3>
|
|
520
|
-
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> ProgressAnimation</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">progress</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
521
|
-
<span class="line"><span style="color:#6A737D"> // Custom fade based on progress</span></span>
|
|
522
|
-
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> opacity</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583"><</span><span style="color:#79B8FF"> 0.3</span><span style="color:#F97583"> ?</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583">/</span><span style="color:#79B8FF"> 0.3</span><span style="color:#F97583"> :</span><span style="color:#79B8FF"> 1</span><span style="color:#E1E4E8">;</span></span>
|
|
523
|
-
<span class="line"><span style="color:#E1E4E8"> </span></span>
|
|
524
|
-
<span class="line"><span style="color:#6A737D"> // Custom scale based on progress </span></span>
|
|
525
|
-
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> scale</span><span style="color:#F97583"> =</span><span style="color:#79B8FF"> 0.8</span><span style="color:#F97583"> +</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583">*</span><span style="color:#79B8FF"> 0.2</span><span style="color:#E1E4E8">; </span><span style="color:#6A737D">// 0.8 to 1.0</span></span>
|
|
526
|
-
<span class="line"></span>
|
|
527
|
-
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
528
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex items-center justify-center w-full h-full bg-gray-900'</span><span style="color:#E1E4E8">)}></span></span>
|
|
529
|
-
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{{</span></span>
|
|
530
|
-
<span class="line"><span style="color:#F97583"> ...</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold text-white'</span><span style="color:#E1E4E8">),</span></span>
|
|
531
|
-
<span class="line"><span style="color:#E1E4E8"> opacity,</span></span>
|
|
532
|
-
<span class="line"><span style="color:#E1E4E8"> transform: </span><span style="color:#9ECBFF">`scale(${</span><span style="color:#E1E4E8">scale</span><span style="color:#9ECBFF">})`</span></span>
|
|
533
|
-
<span class="line"><span style="color:#E1E4E8"> }}></span></span>
|
|
534
|
-
<span class="line"><span style="color:#E1E4E8"> {title}</span></span>
|
|
535
|
-
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
536
|
-
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
537
|
-
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
538
|
-
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
539
|
-
<span class="line"></span></code></pre>
|
|
540
793
|
<h3 id="using-frame">Using <code>frame</code></h3>
|
|
541
794
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> FrameAnimation</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">frame</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
542
795
|
<span class="line"><span style="color:#6A737D"> // Color cycling using frame number</span></span>
|
|
543
796
|
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> hue</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> (frame </span><span style="color:#F97583">*</span><span style="color:#79B8FF"> 5</span><span style="color:#E1E4E8">) </span><span style="color:#F97583">%</span><span style="color:#79B8FF"> 360</span><span style="color:#E1E4E8">; </span><span style="color:#6A737D">// Cycle through colors</span></span>
|
|
544
|
-
<span class="line"
|
|
797
|
+
<span class="line"></span>
|
|
545
798
|
<span class="line"><span style="color:#6A737D"> // Pulsing based on frame</span></span>
|
|
546
799
|
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> fps</span><span style="color:#F97583"> =</span><span style="color:#79B8FF"> 30</span><span style="color:#E1E4E8">;</span></span>
|
|
547
800
|
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> pulse</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> Math.</span><span style="color:#B392F0">sin</span><span style="color:#E1E4E8">(frame </span><span style="color:#F97583">/</span><span style="color:#E1E4E8"> fps </span><span style="color:#F97583">*</span><span style="color:#E1E4E8"> Math.</span><span style="color:#79B8FF">PI</span><span style="color:#F97583"> *</span><span style="color:#79B8FF"> 2</span><span style="color:#E1E4E8">) </span><span style="color:#F97583">*</span><span style="color:#79B8FF"> 0.2</span><span style="color:#F97583"> +</span><span style="color:#79B8FF"> 0.8</span><span style="color:#E1E4E8">; </span><span style="color:#6A737D">// 0.6 to 1.0</span></span>
|
|
@@ -559,11 +812,32 @@
|
|
|
559
812
|
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
560
813
|
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
561
814
|
<span class="line"></span></code></pre>
|
|
815
|
+
<h3 id="using-progress">Using <code>progress</code></h3>
|
|
816
|
+
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> ProgressAnimation</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">progress</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
817
|
+
<span class="line"><span style="color:#6A737D"> // Custom fade based on progress</span></span>
|
|
818
|
+
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> opacity</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583"><</span><span style="color:#79B8FF"> 0.3</span><span style="color:#F97583"> ?</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583">/</span><span style="color:#79B8FF"> 0.3</span><span style="color:#F97583"> :</span><span style="color:#79B8FF"> 1</span><span style="color:#E1E4E8">;</span></span>
|
|
819
|
+
<span class="line"></span>
|
|
820
|
+
<span class="line"><span style="color:#6A737D"> // Custom scale based on progress</span></span>
|
|
821
|
+
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> scale</span><span style="color:#F97583"> =</span><span style="color:#79B8FF"> 0.8</span><span style="color:#F97583"> +</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583">*</span><span style="color:#79B8FF"> 0.2</span><span style="color:#E1E4E8">; </span><span style="color:#6A737D">// 0.8 to 1.0</span></span>
|
|
822
|
+
<span class="line"></span>
|
|
823
|
+
<span class="line"><span style="color:#F97583"> return</span><span style="color:#E1E4E8"> (</span></span>
|
|
824
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">div</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'flex items-center justify-center w-full h-full bg-gray-900'</span><span style="color:#E1E4E8">)}></span></span>
|
|
825
|
+
<span class="line"><span style="color:#E1E4E8"> <</span><span style="color:#85E89D">h1</span><span style="color:#B392F0"> style</span><span style="color:#F97583">=</span><span style="color:#E1E4E8">{{</span></span>
|
|
826
|
+
<span class="line"><span style="color:#F97583"> ...</span><span style="color:#B392F0">tw</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'text-8xl font-bold text-white'</span><span style="color:#E1E4E8">),</span></span>
|
|
827
|
+
<span class="line"><span style="color:#E1E4E8"> opacity,</span></span>
|
|
828
|
+
<span class="line"><span style="color:#E1E4E8"> transform: </span><span style="color:#9ECBFF">`scale(${</span><span style="color:#E1E4E8">scale</span><span style="color:#9ECBFF">})`</span></span>
|
|
829
|
+
<span class="line"><span style="color:#E1E4E8"> }}></span></span>
|
|
830
|
+
<span class="line"><span style="color:#E1E4E8"> {title}</span></span>
|
|
831
|
+
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">h1</span><span style="color:#E1E4E8">></span></span>
|
|
832
|
+
<span class="line"><span style="color:#E1E4E8"> </</span><span style="color:#85E89D">div</span><span style="color:#E1E4E8">></span></span>
|
|
833
|
+
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
834
|
+
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
835
|
+
<span class="line"></span></code></pre>
|
|
562
836
|
<h3 id="custom-easing">Custom Easing</h3>
|
|
563
837
|
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="tsx"><code><span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> default</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> CustomEasing</span><span style="color:#E1E4E8">({ </span><span style="color:#FFAB70">tw</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">progress</span><span style="color:#E1E4E8">, </span><span style="color:#FFAB70">title</span><span style="color:#E1E4E8"> }) {</span></span>
|
|
564
838
|
<span class="line"><span style="color:#6A737D"> // Smoothstep easing</span></span>
|
|
565
839
|
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> eased</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583">*</span><span style="color:#E1E4E8"> progress </span><span style="color:#F97583">*</span><span style="color:#E1E4E8"> (</span><span style="color:#79B8FF">3</span><span style="color:#F97583"> -</span><span style="color:#79B8FF"> 2</span><span style="color:#F97583"> *</span><span style="color:#E1E4E8"> progress);</span></span>
|
|
566
|
-
<span class="line"
|
|
840
|
+
<span class="line"></span>
|
|
567
841
|
<span class="line"><span style="color:#6A737D"> // Elastic easing</span></span>
|
|
568
842
|
<span class="line"><span style="color:#F97583"> const</span><span style="color:#79B8FF"> elastic</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> Math.</span><span style="color:#B392F0">pow</span><span style="color:#E1E4E8">(</span><span style="color:#79B8FF">2</span><span style="color:#E1E4E8">, </span><span style="color:#F97583">-</span><span style="color:#79B8FF">10</span><span style="color:#F97583"> *</span><span style="color:#E1E4E8"> progress) </span><span style="color:#F97583">*</span><span style="color:#E1E4E8"> Math.</span><span style="color:#B392F0">sin</span><span style="color:#E1E4E8">((progress </span><span style="color:#F97583">-</span><span style="color:#79B8FF"> 0.075</span><span style="color:#E1E4E8">) </span><span style="color:#F97583">*</span><span style="color:#E1E4E8"> (</span><span style="color:#79B8FF">2</span><span style="color:#F97583"> *</span><span style="color:#E1E4E8"> Math.</span><span style="color:#79B8FF">PI</span><span style="color:#E1E4E8">) </span><span style="color:#F97583">/</span><span style="color:#79B8FF"> 0.3</span><span style="color:#E1E4E8">) </span><span style="color:#F97583">+</span><span style="color:#79B8FF"> 1</span><span style="color:#E1E4E8">;</span></span>
|
|
569
843
|
<span class="line"></span>
|
|
@@ -580,7 +854,7 @@
|
|
|
580
854
|
<span class="line"><span style="color:#E1E4E8"> );</span></span>
|
|
581
855
|
<span class="line"><span style="color:#E1E4E8">}</span></span>
|
|
582
856
|
<span class="line"></span></code></pre>
|
|
583
|
-
<h3 id="when-to-use-
|
|
857
|
+
<h3 id="when-to-use-programmatic-animations">When to Use Programmatic Animations</h3>
|
|
584
858
|
<p>Use <code>progress</code>/<code>frame</code> instead of animation classes when you need:</p>
|
|
585
859
|
<ul>
|
|
586
860
|
<li><strong>Custom easing functions</strong> (elastic, spring, bounce with specific curves)</li>
|
|
@@ -602,4 +876,4 @@
|
|
|
602
876
|
<li><a href="/video">Video Templates</a> - Creating video templates</li>
|
|
603
877
|
<li><a href="/sdk">SDK</a> - Programmatic rendering with animations</li>
|
|
604
878
|
<li><a href="/helpers">Helpers</a> - QR codes, images, and more</li>
|
|
605
|
-
</ul> </article> </div> </main> </div> </body></html>
|
|
879
|
+
</ul> </article> </div> </main> <!-- Table of Contents Sidebar (Desktop only) --> <aside id="toc-sidebar" class="toc-sidebar fixed top-0 right-0 h-screen w-64 overflow-y-auto z-10" data-astro-cid-mw7aashj> <div class="px-6 py-8" data-astro-cid-mw7aashj> <h3 class="text-xs font-semibold text-muted-foreground mb-4 uppercase tracking-wider" data-astro-cid-mw7aashj>On this page</h3> <nav id="toc-nav" data-astro-cid-mw7aashj> <!-- TOC will be populated by JavaScript --> </nav> </div> </aside> </div> </body></html>
|