@badrap/material-symbols-omnibus

0.0.7 • Public • Published

@badrap/material-symbols-omnibus

[!NOTE] Importing this package pulls in data for all Material Symbol icons. You're probably better off using something like marella/material-symbols.

A library to resolve a Material Symbol icons name to an SVG path.

The icons are the outlined variant with the 20px optical size. Both the filled and outlined versions are available.

Installation

npm i @badrap/material-symbols-omnibus

Usage

import { resolveMaterialSymbol } from "@badrap/material-symbols-omnibus";

export function MaterialSymbol(props: { name: string }) {
  const data = resolveMaterialSymbol(props.name);
  if (!data) {
    return null;
  }
  return (
    <svg width={data.width} height={data.height} viewBox={data.viewBox}>
      <path d={data.path} />
    </svg>
  );
}

License

Material Symbols are available under the Apache License Version 2.0. Therefore this package is also available under the same license.

Readme

Keywords

none

Package Sidebar

Install

npm i @badrap/material-symbols-omnibus

Weekly Downloads

117

Version

0.0.7

License

Apache-2.0

Unpacked Size

6.32 MB

Total Files

11

Last publish

Collaborators

  • jviide
  • badrapbot