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

@servicetitan/anvil2

Package Overview
Dependencies
Maintainers
0
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@servicetitan/anvil2

Anvil2 Design System

  • 1.12.2
  • npm
  • Socket score

Version published
Weekly downloads
2.9K
decreased by-15.92%
Maintainers
0
Weekly downloads
 
Created
Source

Anvil2 Design System

Anvil2 contains reusable components, fonts, icons, and more for building ServiceTitan products.

Getting Started

Installation

We recommend installing Anvil2 by running the following npm command (or the equivalent yarn/pnpm command) in your project folder:

npm install @servicetitan/anvil2

NOTE: Using Anvil2 React components requires a minimum of React 18+ and may require react-router-dom 5.3.0+ for certain features.

Usage

Named components can be imported:

import { Button, Icon } from "@servicetitan/anvil2";

If you're developing a MFE, the @servicetitan/startup package should be able to use the monolith's copy of the @servicetitan/anvil2 package to reduce your production bundle size.

Anvil2 icons are expected to be used with the SVGR library, which will import SVGs as React components. SVGR should already be part of the latest @servicetitan/startup Webpack configuration.

Importing and using an icon:

import { Button, Icon } from "@servicetitan/anvil2";

import Warning from "@servicetitan/anvil2/assets/icons/material/round/warning.svg";
import Star from '@servicetitan/anvil2/assets/icons/material/round/star.svg';
import LocalSettings from '@servicetitan/anvil2/assets/icons/st/local_settings.svg';

<Icon svg={Warning} size="large" />
<Button icon={Star} aria-label="Favorite" />
<Button icon={LocalSettings}>Settings</Button>

Provider

When using the Anvil2 component library, we recommend wrapping the top level of your app in the AnvilProvider component, which also supports light/dark themes and localization configuration:

import { AnvilProvider } from "@servicetitan/anvil2";

<AnvilProvider themeData={...} localizationData={...}>
  ...
</AnvilProvider>

Documentation

You can read the Anvil2 docs at: https://anvil.servicetitan.com/

Contributing

We welcome contributions of all kinds from design to code. Please see our guide to contributing.

FAQs

Package last updated on 09 Oct 2024

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