0.3.0 • Published 2 years ago

luma v0.3.0

Weekly downloads
13
License
MIT
Repository
github
Last release
2 years ago

Luma

A global illumination library from Framer.

API subject to change before version 1.0.

Usage

React

Set up a global light.

import { Light } from "luma"

export function App({ children }) {
    return (
        <Light x={-20} y={-40}>
            {children}
        </Light>
    )
}

Cast the light by generating a boxShadow property.

import { useBoxShadow } from "luma"

export function Component() {
    const depth = 10
    const boxShadow = useBoxShadow(depth)

    return <div style={{ boxShadow }} />
}