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

@sanity/icons

Package Overview
Dependencies
Maintainers
0
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/icons

The Sanity icons.

  • 3.5.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
349K
increased by1.49%
Maintainers
0
Weekly downloads
 
Created

What is @sanity/icons?

@sanity/icons is an npm package that provides a collection of SVG icons designed for use with the Sanity.io content platform. These icons can be easily integrated into React applications to enhance the user interface with visually appealing and consistent iconography.

What are @sanity/icons's main functionalities?

Importing Icons

You can import specific icons from the @sanity/icons package to use in your React components. This allows you to include only the icons you need, optimizing your application's performance.

import { AddIcon, EditIcon, TrashIcon } from '@sanity/icons';

Using Icons in Components

Icons can be used directly within your React components. This example demonstrates how to use the AddIcon within a button component to create a visually appealing 'Add Item' button.

import { AddIcon } from '@sanity/icons';

function AddButton() {
  return (
    <button>
      <AddIcon /> Add Item
    </button>
  );
}

Styling Icons

Icons can be styled using standard CSS properties. This example shows how to style the EditIcon with a margin and how to style the button containing the icon.

import { EditIcon } from '@sanity/icons';

function EditButton() {
  return (
    <button style={{ color: 'blue', fontSize: '24px' }}>
      <EditIcon style={{ marginRight: '8px' }} /> Edit
    </button>
  );
}

Other packages similar to @sanity/icons

Keywords

FAQs

Package last updated on 21 Dec 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