Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@chakra-ui/anatomy
Advanced tools
@chakra-ui/anatomy is a utility package from Chakra UI that provides a set of predefined anatomy objects for various UI components. These anatomy objects help in creating consistent and accessible component structures by defining the parts and their respective styles.
Button Anatomy
The button anatomy defines the parts of a button component, such as 'container', 'icon', and 'label'. This helps in creating a consistent button structure across the application.
const { buttonAnatomy } = require('@chakra-ui/anatomy');
const parts = buttonAnatomy.keys;
console.log(parts); // ['container', 'icon', 'label']
Input Anatomy
The input anatomy defines the parts of an input component, such as 'addon', 'field', and 'element'. This ensures a consistent structure for input components.
const { inputAnatomy } = require('@chakra-ui/anatomy');
const parts = inputAnatomy.keys;
console.log(parts); // ['addon', 'field', 'element']
Modal Anatomy
The modal anatomy defines the parts of a modal component, such as 'overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', and 'footer'. This helps in creating a consistent modal structure.
const { modalAnatomy } = require('@chakra-ui/anatomy');
const parts = modalAnatomy.keys;
console.log(parts); // ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer']
React-Bootstrap is a popular UI library that provides pre-styled components based on Bootstrap. It offers a wide range of components with predefined structures and styles, similar to how @chakra-ui/anatomy provides predefined anatomy objects for consistent component structures.
Material-UI is a comprehensive UI library for React that implements Google's Material Design guidelines. It offers a variety of components with predefined structures and styles, similar to the anatomy objects provided by @chakra-ui/anatomy.
Ant Design (antd) is a UI library for React that provides a set of high-quality components with predefined structures and styles. Like @chakra-ui/anatomy, it helps in creating consistent and accessible UI components.
This package declares the anatomy for the Chakra UI components.
It was inspired the ::part()
selector from the
W3C CSS Shadow Parts Draft with
data-attributes.
This is an internal utility, not intended for public usage.
yarn add @chakra-ui/anatomy
# or
npm i @chakra-ui/anatomy
Yes please! See the contributing guidelines for details.
This project is licensed under the terms of the MIT license.
FAQs
The anatomy of all chakra components
The npm package @chakra-ui/anatomy receives a total of 559,145 weekly downloads. As such, @chakra-ui/anatomy popularity was classified as popular.
We found that @chakra-ui/anatomy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.