elemental-fx
v0.1.2
Published
CLI for adding elemental-fx effect layers to consumer projects.
Readme
elemental-fx
CLI for adding local elemental-fx effect layers to React, Next, and Vite projects.
Usage
npx elemental-fx add water-surface
npx elemental-fx add ink-cursorGenerated files are local React layer components. They render a canvas and call the matching framework-free runtime engine:
src/components/effects/water-surface.tsx
src/components/effects/ink-cursor.tsxIf the project has no src/ directory, files are created under components/effects/.
Options
npx elemental-fx add water-surface --path app/effects
npx elemental-fx add water-surface --overwrite
npx elemental-fx add water-surface --dry-run
npx elemental-fx add water-surface --no-install--path <dir>writes the generated layer into a custom directory.--overwritereplaces an existing file.--dry-runprints the target path and source without writing or installing.--no-installwrites the file but skips package installation.
Example
import { WaterSurface } from "@/components/effects/water-surface";
export function Hero() {
return (
<section className="relative h-[500px] overflow-hidden">
<WaterSurface className="absolute inset-0 z-0" color="white" />
<div className="relative z-10">Launch faster</div>
</section>
);
}Packages
@elemental-fx/canvas-effectsprovides Canvas 2D runtime effects.@elemental-fx/fluid-effectsprovides WebGL fluid runtime effects.
License
MIT
