• A meter block. mode selects the drawing, items are the tracked values, and the options control the labels drawn beside them and where the block sits on the page.

    Parameters

    • mode: MeterMode
    • items: readonly {
          color?: string;
          current: number;
          icon: string;
          id?: string;
          max: number;
          name: string;
          ratingIcon?: string;
      }[]
    • options: MeterOptions = {}

    Returns MeterBlock

    const hp = meter('bar', [{ name: 'HP', icon: 'heart', current: 8, max: 10, color: '#c33' }], { showMax: true })