npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-fabric-fiber

v1.1.0

Published

Composable Vue wrappers around Fabric.js primitives.

Readme

vue-fabric-fiber

Composable Vue wrappers around Fabric.js primitives. Each component manages its own Fabric object lifecycle and keeps props in sync with the underlying canvas instance.

Installation

pnpm add vue-fabric-fiber fabric

Quick Start

<script setup lang="ts">
import type { FabricRectModelValue, FabricTextModelValue } from 'vue-fabric-fiber'
import { ref } from 'vue'
import {
  FabricCanvas,
  FabricCircle,
  FabricImage,
  FabricRect,

  FabricText

} from 'vue-fabric-fiber'

const rect = ref<FabricRectModelValue>({
  left: 120,
  top: 140,
  width: 220,
  height: 140,
  fill: '#38bdf8',
})

const label = ref<FabricTextModelValue>({
  text: 'Hello Fabric',
  left: 160,
  top: 180,
  fontSize: 42,
  fill: '#fef3c7',
})
</script>

<template>
  <FabricCanvas :canvas-options="{ width: 640, height: 400, selection: true }">
    <FabricImage
      src="https://picsum.photos/640/400"
      width="640"
      height="400"
      :selectable="false"
      :has-controls="false"
    />
    <FabricRect v-model="rect" />
    <FabricCircle :model-value="{ left: 420, top: 180, radius: 60, fill: '#f472b6' }" />
    <FabricText v-model="label" />
  </FabricCanvas>
</template>

Components

| Component | Description | | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | FabricCanvas | Root context provider. Creates the fabric.Canvas instance, injects control helpers for child objects, and accepts a pixel-ratio prop to override the detected devicePixelRatio. | | RenderGroup | Nested task queue/scoping. Useful for grouping async loads or delaying render until the canvas is ready; supports queue priority and disableQueue tuning. | | Object wrappers | FabricImage, FabricText, FabricRect, FabricCircle, FabricEllipse, FabricTriangle, FabricLine, FabricPath, FabricPolyline, FabricPolygon. Each offers two-way binding through v-model. |

Object Props

All shape components accept the typed subset of their Fabric counterparts. For example FabricRect works with FabricRectModelValue, mirroring fabric.Rect options minus canvas-only fields such as clipPath. When model binding is not required, you may pass :model-value="{ ... }" as a one-way prop.

Sequential Mutations

Complex additions or async loads should wrap content in RenderGroup so the task queue respects insertion order:

<FabricCanvas>
  <RenderGroup>
    <FabricImage src="/map.png" width="1024" :selectable="false" />
    <FabricText :model-value="{ text: 'Overlay', left: 400, top: 240 }" />
  </RenderGroup>
</FabricCanvas>

RenderGroup also exposes a couple of props for advanced orchestration:

  • priority — higher numbers run later (toward the top of the stack). Values are flipped before hitting the queue so you can think in z-index terms.
  • disableQueue — skips the sequential queue entirely so lightweight objects can attach to the canvas immediately.

Type Exports

All ModelValue helper types are available from the package root. Import them to author type-safe refs:

import type { FabricPathModelValue } from 'vue-fabric-fiber'

Demos

Run the docs/playground app (now living in apps/docs) to view interactive recipes:

pnpm --filter docs dev -- --open

Routes:

  • / — Overview + JSON inspector
  • /demos/basic — hero banner composition
  • /demos/text-playground — text props playground
  • /demos/composite — layered scenes with RenderGroup
  • /demos/shapes — shape toolkit covering all primitives

Build targets

  • pnpm build — type-checks via vue-tsc -b and bundles the component library in packages/vue-fabric-fiber/dist/.
  • pnpm --filter docs build — runs the docs/marketing site build (output lives in apps/docs/dist/) so you can deploy it separately from the library artifacts.

SEO configuration

  • Set VITE_SITE_URL in your .env inside apps/docs (for example https://fabric.icebreaker.top) so canonical links, JSON-LD, and social cards point to the correct domain.
  • Update apps/docs/public/sitemap.xml whenever you add or rename demo routes.
  • Keep robots/favicons in apps/docs/public/robots.txt and apps/docs/public/favicon.svg; the library package intentionally omits a public/ directory so npm builds stay lean.