There is a new JavaScript UI project for the mobile Web, and it’s giving Web developers a tool to create native-like app experiences.

SamsaraJS is a functional reactive library for animating layout. It provides a language for positioning, orienting and sizing DOM elements, and animating these properties over time. According to its GitHub page, “Everything in SamsaraJS—from the user input to the rendering pipeline—is a stream, [and] building a user interface becomes the art of composing streams.”

(Related: InRule for JavaScript is ready for developers)

SamsaraJS is the creation of the former chief architect of the Famo.us JavaScript library, David Valdman. Famo.us, an open-source JavaScript framework for building high-performance mobile Web and hybrid apps (and has been renamed “Famous”). Valdman left Famous in 2014, and his work on SamsaraJS grew out of the Famous library.

Recently, Valdman tweeted that “It’s time we think of layout on the Web in a whole new way—3D, fluid, coordinated, reactive.” He was quoted in JavaWorld saying that Web developers are held back by two factors: performance on mobile, and expressiveness. By expressiveness, he meant that Web developers need to think about interactivity in user interfaces that isn’t “watered down.”

SamsaraJS was also created to solve performance issues on the mobile Web. Under the hood, “Animations are hardware-accelerated and batched by a single request animation frame loop,” said Valdman’s GitHub page. Developers can build responsive user interfaces with physics-based transitions, support for gestures, and a stream architecture that makes coordinating complex animations “simple.”

Some features that come with SamsaraJS include:

  • Full 3D space that can allow for depth and perspective in apps.
  • SamsaraJS exports CSS3 hardware to avoid DOM reflow and keep applications running at 60 frames per second. Developers can skew, scale, rotate without impacting performance.
  • Responsive design can be used to distribute content or adapt a layout to resizing elements.