easy-css-transform-builder is a JavaScript/TypeScript utility library designed to simplify the creation of complex CSS `transform` values. It enables developers to define various transform properties like `translateX`, `scale`, `rotate3d`, and `skewY` within a simple JavaScript object, which the library then serializes into a valid CSS `transform` string. The current version is 0.1.0, indicating it is in its initial release phase without an established release cadence, and it ships with TypeScript types for enhanced developer experience. Its key differentiator is its straightforward, fluent API for programmatically generating CSS transform strings, making it particularly useful for dynamic styling and animation integrations within JavaScript-driven UI frameworks, as illustrated by its usage examples.
npm install easy-css-transform-builderVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes the transform builder with default units and demonstrates how to apply multiple CSS transform properties from an object into a single CSS transform string.
Review the `CHANGELOG.md` for updates when upgrading, and consider pinning exact package versions to avoid unexpected breaking changes.
Always explicitly define units when creating the builder (`createCSSTransformBuilder({ length: 'em', angle: 'rad' })`) or provide string values with units (e.g., `translateX: '50%'`) for each property to ensure the desired CSS output.Ensure all input values conform to the expected types (number or string) and valid ranges for CSS transform properties as per MDN documentation.
Use a named ESM import: `import { createCSSTransformBuilder } from 'easy-css-transform-builder';`Ensure `createCSSTransformBuilder()` is called to get a builder instance before using it: `const builder = createCSSTransformBuilder();`
Ensure array inputs for `translate3d` and `scale3d` have exactly 3 elements, and `rotate3d` has exactly 4 elements (x, y, z, angle).
No dependency data recorded yet.