๐Ÿš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more โ†’
Socket
Sign inDemoInstall
Socket

elementari

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elementari

Interactive visualizations for materials science: periodic tables, Bohr atoms, nuclei, heatmaps, scatter plots.

0.3.14
latest
Source
npm
Version published
Weekly downloads
171
-40.21%
Maintainers
1
Weekly downloads
ย 
Created
Source

Logo
Elementari

Tests GH Pages pre-commit.ci status Open in StackBlitz

elementari is a toolkit for building interactive web UIs for materials science: periodic tables, 3d crystal structures (and molecules, though needs some improvements!), Bohr atoms, nuclei, heatmaps, scatter plots. It's under active development and not yet ready for production use but we appreciate any feedback from beta testers! ๐Ÿ™

Screenshot of landing page

๐Ÿ“ฆ โ€‰ Heatmap

This screenshot demonstrates the periodicity of elemental properties (i.e. why it's called periodic table). In this case, you're seeing recurring bumps and valleys in the first ionization energy as a function of atomic number.

Screenshot of periodic table heatmap

โš›๏ธ โ€‰ 3D Structure Viewer

3D Structure Viewer

โš›๏ธ โ€‰ Element Details Pages

The details page for gold.

https://user-images.githubusercontent.com/30958850/186975855-8e0d94f9-e4e3-47a2-9354-9c012b37307c.mp4

๐Ÿ”จ โ€‰ Installation

npm install --dev elementari

๐Ÿ“™ โ€‰ Usage

Import the PeriodicTable component and pass it some heatmap values:

<script>
  import PeriodicTable from 'elementari'

  const heatmap_values = { H: 10, He: 4, Li: 8, Fe: 3, O: 24 }
</script>

<PeriodicTable {heatmap_values} />

๐ŸŽฌ โ€‰ Events

PeriodicTable.svelte forwards the following events from each ElementTile:

  • click
  • mouseenter
  • mouseleave
  • keyup
  • keydown

Each event is a Svelte dispatch event with the following detail payload:

detail: {
  element: ChemicalElement
  active: boolean // whether the event target tile is currently active
  dom_event: Event // the DOM event that triggered the Svelte dispatch
}

See DispatchPayload and PeriodicTableEvents in src/lib/index.ts

๐Ÿงช โ€‰ Coverage

StatementsBranchesLines
StatementsBranchesLines

๐Ÿ™ โ€‰ Acknowledgements

This project would not have been possible as a one-person side project without many fine open-source projects. ๐Ÿ™ To name just a few:

3D graphics2D graphicsDocsBundlerTesting
three.jsd3mdsvexviteplaywright
threltesharprehypesveltekitvitest

Keywords

svelte

FAQs

Package last updated on 05 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts