[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"guide-nav":3,"doc-\u002Fdocs\u002Fcomponents\u002Flineargradient":127,"github-stars":396},[4,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,70,74,78,82,86,91,95,99,103,107,111,115,119,123],{"path":5,"title":6,"description":7,"category":8},"\u002Fdocs\u002Fguide","Getting started","Shaders is a library of GPU effect components for Vue, React, Svelte, Solid, JavaScript and Framer, with a design editor for building with them.","code",{"path":10,"title":11,"description":12,"category":8},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":14,"title":15,"description":16,"category":8},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":18,"title":19,"description":20,"category":8},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":22,"title":23,"description":24,"category":8},"\u002Fdocs\u002Fguide\u002Fprops-reactivity","Props and reactivity","Bind props to your framework's state so effects update when it changes, and animate props with an animation library.",{"path":26,"title":27,"description":28,"category":8},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":30,"title":31,"description":32,"category":8},"\u002Fdocs\u002Fguide\u002Flayout-positioning","Layout and positioning","Size and place a shader in your page with CSS, as a background, a fill, or an inline block.",{"path":34,"title":35,"description":36,"category":8},"\u002Fdocs\u002Fguide\u002Fsizing-and-units","Sizing and units","Size and place layers in CSS units (px, %, vw, rem, and canvas units) that stay correct as the canvas and window resize.",{"path":38,"title":39,"description":40,"category":8},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":42,"title":43,"description":44,"category":8},"\u002Fdocs\u002Fguide\u002Fshape-effects","Shape effects","Pick the 2D, 3D or custom SVG shape that Glass, Neon, Emboss and other shape effects draw inside.",{"path":46,"title":47,"description":48,"category":8},"\u002Fdocs\u002Fguide\u002Fcolor-space","Color space","Match colors to your design tool with the output color space, and keep bright layers from clipping with tone mapping.",{"path":50,"title":51,"description":52,"category":8},"\u002Fdocs\u002Fguide\u002Fhooks-events","Hooks and events","Run code when an effect is ready to show, and show a fallback when the GPU can't run it.",{"path":54,"title":55,"description":56,"category":8},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":58,"title":59,"description":60,"category":8},"\u002Fdocs\u002Fguide\u002Fcustom-shaders","Custom components","Write your own component in TypeScript, use it like any component in the library, and write WGSL by hand when you need to.",{"path":62,"title":63,"description":64,"category":8},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":66,"title":67,"description":68,"category":69},"\u002Fdocs\u002Fguide\u002Fmcp","Shaders MCP","Connect your AI coding agent to Shaders so it can find, install and edit effects in your codebase.","workflows",{"path":71,"title":72,"description":73,"category":69},"\u002Fdocs\u002Fguide\u002Fcli","Shaders CLI","Install your own shaders and Pro shaders into your codebase as component files, and keep them in sync with the design editor.",{"path":75,"title":76,"description":77,"category":69},"\u002Fdocs\u002Fguide\u002Fagent-skill","Agent skill","Give your coding agent a skill that teaches it to build with Shaders components, the CLI and Pro shaders.",{"path":79,"title":80,"description":81,"category":8},"\u002Fdocs\u002Fguide\u002Fvideo-rendering","Rendering to video","Turn a shader effect into a video file, from the design editor or from a frame-by-frame pipeline such as Remotion, Hyperframes or Puppeteer.",{"path":83,"title":84,"description":85,"category":8},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",{"path":87,"title":88,"description":89,"category":90},"\u002Fdocs\u002Fguide\u002Fquick-tour-of-the-design-editor","Quick tour of the design editor","A short walkthrough of the full Shaders workflow, from designing on the infinite canvas to exporting code.","editor",{"path":92,"title":93,"description":94,"category":90},"\u002Fdocs\u002Fguide\u002Fintro-to-the-interface","Intro to the interface","A tour of the design editor interface: the canvas, layers, the Properties panel, and the ways to share and export.",{"path":96,"title":97,"description":98,"category":90},"\u002Fdocs\u002Fguide\u002Fcomposing-your-first-shader-effect","Composing your first shader effect","Building a first shader effect in the design editor by stacking and nesting components as layers.",{"path":100,"title":101,"description":102,"category":90},"\u002Fdocs\u002Fguide\u002Fmasking-and-blending","Masking and blending","How blend modes and masks combine components in the design editor.",{"path":104,"title":105,"description":106,"category":90},"\u002Fdocs\u002Fguide\u002Fdynamic-prop-mapping","Dynamic prop mapping","Turning static props into dynamic ones in the design editor: mapping one layer's output into another's prop, following the cursor, or animating automatically.",{"path":108,"title":109,"description":110,"category":90},"\u002Fdocs\u002Fguide\u002Fcustom-media-and-transformations","Custom media and transformations","Uploading images, videos, and SVG files to the media gallery, adding them to a composition, and placing them with transformations.",{"path":112,"title":113,"description":114,"category":90},"\u002Fdocs\u002Fguide\u002Finstalling-a-shader-via-mcp","Installing a shader via MCP","Installing a shader from the design editor into a hero section with the Shaders MCP.",{"path":116,"title":117,"description":118,"category":90},"\u002Fdocs\u002Fguide\u002Fexploring-shape-effects","Exploring shape effects","Applying shape effects such as liquid glass, liquid metal, and glowing edges to built-in shapes and your own SVG.",{"path":120,"title":121,"description":122,"category":90},"\u002Fdocs\u002Fguide\u002Fglass-component-spotlight","Component spotlight: Glass","A short look at the Glass component and the liquid-glass look it creates.",{"path":124,"title":125,"description":126,"category":90},"\u002Fdocs\u002Fguide\u002Fdigital-looks-component-spotlight","Component spotlight: Digital looks","A look at the digital stylization components for glitchy, futuristic, or technical effects.",{"id":128,"title":129,"body":130,"category":386,"componentType":387,"description":140,"extension":388,"meta":389,"navigation":325,"path":390,"requiresChild":391,"seo":392,"sourceUrl":393,"stem":394,"__hash__":395},"components\u002Fdocs\u002Fcomponents\u002FLinearGradient.md","LinearGradient",{"type":131,"value":132,"toc":382},"minimark",[133,137,141,144,149,153,157,378],[134,135,129],"h1",{"id":136},"lineargradient",[138,139,140],"p",{},"Create smooth linear color gradients",[142,143],"shader-preview",{"component":129},[145,146,148],"h2",{"id":147},"props","Props",[150,151],"props-table",{":props":152},"[{\"name\":\"colorA\",\"type\":\"string\",\"default\":\"#1aff00\",\"description\":\"The starting color of the gradient\"},{\"name\":\"colorB\",\"type\":\"string\",\"default\":\"#0000ff\",\"description\":\"The ending color of the gradient\"},{\"name\":\"stops\",\"type\":\"object\",\"default\":\"null\",\"description\":\"Multi-stop gradient colors (overrides Color A \u002F Color B when set)\"},{\"name\":\"start\",\"type\":\"{x: number, y: number}\",\"default\":\"{\\\"x\\\":0,\\\"y\\\":0.5}\",\"description\":\"The starting point of the gradient\"},{\"name\":\"end\",\"type\":\"{x: number, y: number}\",\"default\":\"{\\\"x\\\":1,\\\"y\\\":0.5}\",\"description\":\"The ending point of the gradient\"},{\"name\":\"angle\",\"type\":\"number\",\"default\":\"0\",\"description\":\"Additional rotation angle of the gradient (in degrees)\"},{\"name\":\"edges\",\"type\":\"\\\"stretch\\\" | \\\"transparent\\\" | \\\"mirror\\\" | \\\"wrap\\\"\",\"default\":\"stretch\",\"description\":\"How to handle areas beyond the gradient endpoints\"},{\"name\":\"colorSpace\",\"type\":\"\\\"linear\\\" | \\\"oklch\\\" | \\\"oklab\\\" | \\\"hsl\\\" | \\\"hsv\\\" | \\\"lch\\\"\",\"default\":\"linear\",\"description\":\"Color space for color interpolation\"}]",[145,154,156],{"id":155},"usage","Usage",[158,159,161,207,238,268,298],"code-group",{":tabs":160},"[\"Vue\", \"React\", \"Svelte\", \"Solid\", \"JS\"]",[162,163,168],"pre",{"className":164,"code":165,"language":166,"meta":167,"style":167},"language-vue-html shiki shiki-themes github-dark","\u003CShader>\n  \u003CLinearGradient \u002F>\n\u003C\u002FShader>\n","vue-html","",[8,169,170,186,197],{"__ignoreMap":167},[171,172,175,179,183],"span",{"class":173,"line":174},"line",1,[171,176,178],{"class":177},"s95oV","\u003C",[171,180,182],{"class":181},"s4JwU","Shader",[171,184,185],{"class":177},">\n",[171,187,189,192,194],{"class":173,"line":188},2,[171,190,191],{"class":177},"  \u003C",[171,193,129],{"class":181},[171,195,196],{"class":177}," \u002F>\n",[171,198,200,203,205],{"class":173,"line":199},3,[171,201,202],{"class":177},"\u003C\u002F",[171,204,182],{"class":181},[171,206,185],{"class":177},[162,208,211],{"className":209,"code":165,"language":210,"meta":167,"style":167},"language-jsx shiki shiki-themes github-dark","jsx",[8,212,213,222,230],{"__ignoreMap":167},[171,214,215,217,220],{"class":173,"line":174},[171,216,178],{"class":177},[171,218,182],{"class":219},"sDLfK",[171,221,185],{"class":177},[171,223,224,226,228],{"class":173,"line":188},[171,225,191],{"class":177},[171,227,129],{"class":219},[171,229,196],{"class":177},[171,231,232,234,236],{"class":173,"line":199},[171,233,202],{"class":177},[171,235,182],{"class":219},[171,237,185],{"class":177},[162,239,242],{"className":240,"code":165,"language":241,"meta":167,"style":167},"language-svelte shiki shiki-themes github-dark","svelte",[8,243,244,252,260],{"__ignoreMap":167},[171,245,246,248,250],{"class":173,"line":174},[171,247,178],{"class":177},[171,249,182],{"class":219},[171,251,185],{"class":177},[171,253,254,256,258],{"class":173,"line":188},[171,255,191],{"class":177},[171,257,129],{"class":219},[171,259,196],{"class":177},[171,261,262,264,266],{"class":173,"line":199},[171,263,202],{"class":177},[171,265,182],{"class":219},[171,267,185],{"class":177},[162,269,272],{"className":270,"code":165,"language":271,"meta":167,"style":167},"language-tsx shiki shiki-themes github-dark","tsx",[8,273,274,282,290],{"__ignoreMap":167},[171,275,276,278,280],{"class":173,"line":174},[171,277,178],{"class":177},[171,279,182],{"class":219},[171,281,185],{"class":177},[171,283,284,286,288],{"class":173,"line":188},[171,285,191],{"class":177},[171,287,129],{"class":219},[171,289,196],{"class":177},[171,291,292,294,296],{"class":173,"line":199},[171,293,202],{"class":177},[171,295,182],{"class":219},[171,297,185],{"class":177},[162,299,303],{"className":300,"code":301,"language":302,"meta":167,"style":167},"language-javascript shiki shiki-themes github-dark","import { createShader } from 'shaders\u002Fjs'\n\nconst shader = await createShader(canvas, {\n  components: [\n    { type: 'LinearGradient', props: {} }\n  ]\n})\n","javascript",[8,304,305,321,327,348,354,366,372],{"__ignoreMap":167},[171,306,307,311,314,317],{"class":173,"line":174},[171,308,310],{"class":309},"snl16","import",[171,312,313],{"class":177}," { createShader } ",[171,315,316],{"class":309},"from",[171,318,320],{"class":319},"sU2Wk"," 'shaders\u002Fjs'\n",[171,322,323],{"class":173,"line":188},[171,324,326],{"emptyLinePlaceholder":325},true,"\n",[171,328,329,332,335,338,341,345],{"class":173,"line":199},[171,330,331],{"class":309},"const",[171,333,334],{"class":219}," shader",[171,336,337],{"class":309}," =",[171,339,340],{"class":309}," await",[171,342,344],{"class":343},"svObZ"," createShader",[171,346,347],{"class":177},"(canvas, {\n",[171,349,351],{"class":173,"line":350},4,[171,352,353],{"class":177},"  components: [\n",[171,355,357,360,363],{"class":173,"line":356},5,[171,358,359],{"class":177},"    { type: ",[171,361,362],{"class":319},"'LinearGradient'",[171,364,365],{"class":177},", props: {} }\n",[171,367,369],{"class":173,"line":368},6,[171,370,371],{"class":177},"  ]\n",[171,373,375],{"class":173,"line":374},7,[171,376,377],{"class":177},"})\n",[379,380,381],"style",{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}",{"title":167,"searchDepth":188,"depth":188,"links":383},[384,385],{"id":147,"depth":188,"text":148},{"id":155,"depth":188,"text":156},"Textures","Generator","md",{},"\u002Fdocs\u002Fcomponents\u002Flineargradient",false,{"title":129,"description":140},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fshaders\u002FLinearGradient\u002Findex.ts","docs\u002Fcomponents\u002FLinearGradient","ULdaumOwmcVqcQn2w-dZ9-lwpvPqBjVpFN2hLtoI_vo",{"stars":397},6044]