Introduction

Lyngurium is a transplant of Ammolite that built for Lynx.

Type Safety

With Lyngurium, it is possible to create Lynx styles with type safety.

import type * as React from "@lynxjs/react";

import { style } from "lyngurium";

const StyledButton = (): React.JSX.Element => {
    return <view className={button} />;
};

// style declaration
const button: string = style({
    display: "flex",
});

Runtime Overhead

In the final result, all static functions will be transformed, no computation will be required in the runtime.

Input
Output(JS)
Output (CSS)
index.tsx
import type * as React from "@lynxjs/react";

import { style } from "lyngurium";

const StyledButton = (): React.JSX.Element => {
    return <view className={button} />;
};

// style declaration
const button: string = style({
    display: "flex",
});

Scalability

Like Ammolite, Lyngurium is designed for scale while preserving type safety and runtime performance.

In the final result, all the declarations will be reused after their initial declaration.

Input
Output(JS)
Output (CSS)
index.tsx
import type * as React from "@lynxjs/react";

import { style } from "lyngurium";

const StyledButton = (): React.JSX.Element => {
    return <view className={button} />;
};

const StyledButton2 = (): React.JSX.Element => {
    return <view className={button2} />;
}

// style declaration
const button: string = style({
    display: "flex",
});

const button2: string = style({
    display: "flex",
});