Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@visx/group

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visx/group

visx group

  • 2.0.1-alpha.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
394K
decreased by-21.05%
Maintainers
4
Weekly downloads
 
Created

What is @visx/group?

@visx/group is a part of the VisX library, which is a collection of reusable low-level visualization components. The @visx/group package specifically provides a way to group SVG elements together, making it easier to manage and transform collections of SVG elements as a single unit.

What are @visx/group's main functionalities?

Grouping SVG Elements

This feature allows you to group multiple SVG elements together and apply transformations like translation to the entire group. In this example, two circles are grouped together and the entire group is translated 100 units down and 100 units to the right.

import { Group } from '@visx/group';
import { Circle } from '@visx/shape';

function MyComponent() {
  return (
    <svg width={500} height={500}>
      <Group top={100} left={100}>
        <Circle cx={50} cy={50} r={20} fill="blue" />
        <Circle cx={150} cy={50} r={20} fill="red" />
      </Group>
    </svg>
  );
}

Nested Groups

This feature allows you to nest groups within other groups, enabling complex transformations and hierarchical structuring of SVG elements. In this example, a blue circle is grouped and translated, and within that group, another group containing a red circle is further translated.

import { Group } from '@visx/group';
import { Circle } from '@visx/shape';

function MyComponent() {
  return (
    <svg width={500} height={500}>
      <Group top={50} left={50}>
        <Circle cx={50} cy={50} r={20} fill="blue" />
        <Group top={50} left={50}>
          <Circle cx={50} cy={50} r={20} fill="red" />
        </Group>
      </Group>
    </svg>
  );
}

Other packages similar to @visx/group

Keywords

FAQs

Package last updated on 11 Aug 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc