Introduction
Ammolite was born from the real-world experience of building modern applications. During the development process, it is often to meet different annoying situations.
Type Safety
When working with different styling libraries, styling code often lacks strong type guarantees. Errors only show up in the runtime, which feels like writing untyped JavaScript.
Without static validation, mistakes in styling definitions remain undetected until execution.
Runtime Overhead
Some of the CSS-in-JS libraries provide better type support, but the additional bundle size and runtime work are still a concern.
While the API feels convenient, additional JavaScript and runtime computation can accumulate over time.
Scalability
Scalability matters as applications grow. Not every styling approach scales cleanly across large projects.
Tailwind CSS demonstrates how layouts can scale with zero runtime overhead. However, this reintroduces the earlier situation - limited type safety.
It sacrifices the readability and maintainability of the code with limited type safety.
The Solution
Ammolite resolves these situations without compromise.
It is designed for scale while preserving type safety and runtime performance. An internal compiler transforms static style functions into class names and extracted CSS. Identical declarations are deduplicated automatically, ensuring efficient output.