• Stars
    star
    108
  • Rank 309,990 (Top 7 %)
  • Language
    PHP
  • License
    GNU General Publi...
  • Created over 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The WordPress.com icon set

Gridicons

The Calypso / WordPress.com official icon set.

Using the Gridicon Component in your project

Note that this component requires react to be installed in your project. If you don't want to use React, you can simply include the raw .svg files from the svg-min folder.

Gridicon renders a single svg icon based on an icon prop. It takes a size property but defaults to 24px. For greater sharpness, the icons should only be shown at either 18px, 24px, 36px or 48px.

There's a gallery with all the available icons in http://automattic.github.io/gridicons/.

Install

Use the following command and execute in your terminal:

npm install gridicons --save

Usage

You can either import the whole iconset and decide at run-time which icon to use:

import Gridicon from 'gridicons';
//...
render() {
    return <Gridicon icon="add-image" />;
}

Or import icons individually:

import GridiconAddImage from 'gridicons/dist/add-image';
//...
render() {
    return <GridiconAddImage />;
}

If you use only a few icons, the recommended way of using the Gridicon library is to import them individually. At the moment of writing this, individual icons are between 1K and 2K, and the file containing the whole iconset sits at 92K.

Props

  • icon: String - the icon name. This is ignored when importing icons individually.
  • size: Number - (default: 24) set the size of the icon.
  • onClick: Function - (optional) if you need a click callback.

Notes:

  • The icon set is made to be used exactly at these pixel sizes: 12, 18, 24, 36, 48, 54, 72.
  • gridicon-my-sites as it's a small-size version of the WordPress logo, shouldn't be used larger than 36px. If you need to use the WordPress logo in larger sizes, see the Social Logos project.

Icon Set Style Guidelines

  • 24dp base grid
  • straight 45 degree angles
  • flat, bidimensional look (no faux 3D whatsoever)
  • 2dp lines
  • 2dp radius rounded corners
  • no logos
  • hollow means inactive, solid means active (for example a hollow bookmark star is solid when checked)
  • icons should be sized optically so they are balanced against each other, see icon-template.ai

These are not rules, they are guidelines that can be broken with the proper reason. The purpose of them is to achieve a uniform look as we all work on it together. They are also open to growing organically. They are meant to guide you to create an icon that fits with all the others (style, alignment, size, ...), if you break any of the above to make it fit better, that works too.

Notes:

  • the svg-min files can both be used in production directly or dragged to Sketch to create designs.
  • the sources/svg-32 folder contains a subset of icons optimized at 32px, for the iOS navigation bar.

Propose a New Icon

Note that the icons in this set are tied to be used in Calypso, but there might be exceptions for more general icons that make sense to be added.

  1. Make sure you have a updated local clone of the repository.
  2. Draw the icon in Illustrator on a 24px grid using the guidelines above (use icon-template.ai as starting point). Tip: tap CMD + Option + Y in Illustrator to see the pixel grid version.
  3. Submit a Pull Request with the icon as a SVG file (inside the sources/svg folder), make sure to include a screenshot, ideally containing side by side comparison with some other Gridicons as a visual reference.
  4. Discuss, iterate, review, refine until ready.
  5. Once ready, an admin will proceed adding it.

Add a Proposed Icon to Gridicons (Admins Only)

  1. Switch to the branch (i.e. Pull Request) with the new icon.
  2. Review the SVG source of the new icons to make sure they are clean and readable.
  3. Check pixel sharpness: open in Illustrator (with "Pixel Preview") or Sketch (with "Show Pixels"), adjust if needed.
  4. Run grunt command from terminal. It will generate svg-min, build, dist, svg-sprite, pdf, php, and docs.
  5. Commit
  6. Merge & delete branch

Installing Automation Scripts

This icon set uses a few automation scripts to ease the generation of new icons in a reliable way. In short, we require node and grunt. For detailed instructions check the installation page.

Once you checkout the repo run npm install in the gridicons folder. To generate all the fonts, svgs and so on you run npm run build

Publishing to npm

Note: to proceed with this you need to have write authorization to npm.

  1. Create a new PR with updated CHANGELOG.md and updated version in package.json (i.e. 1.2.3-alpha.1), see an example here.
  2. In the "CHANGELOG.md" make sure to check all the previous commits since the previous versioned release.
  3. Pre-publish that PR branch on npm with npm publish --tag next (more info). Running the npm publish --tag next command will send the data that you have localy to npm. Having the alpha version in the package.json file will create a newly tagged version npm package. Use npm view gridicons to look at the list of current tags. You do not need to commit changes to github in order to publish to npm, but it is recommended so folks testing know what's available.
  4. Create a new update PR in a repository that makes use of Gridicons and run npm install gridicons@next --save (which will update packages.json). If you're creating the PR in Calypso and you get warnings, it might need to regenerate the shrinkwrap, in which case run npm run update-deps. See an example here.
  5. Test if the new icons show up, and there are no regressions in the previous icons. Take a look at the http://calypso.localhost:3000/devdocs/design/gridicons for example.
  6. If changes look good, remove the alpha postfix in the version (i.e. 1.2.3-alpha.1 to 1.2.3) on both repositories PRs.
  7. Merge the Gridicons PR.
  8. Tag the release on GitHub: git tag -a v1.2.3 -m "Release v1.2.3" (and push git push origin v1.2.3).
  9. Check if it shows up in the Releases list.
  10. Publish to MASTER using the latest tag npm publish.
  11. Merge the update PR in the other repository.

License

Gridicons is licensed under GNU General Public License v2 (or later).

More notes on publishing to npm

You need to have a npm user account. Create one here. Once you have created it, set up the account on you machine via $ npm adduser

Setup the 2fa with npm $ npm profile enable-2fa

Now everytime before you can publish You will be asked for a your 2FA code (OPT)

More Repositories

1

mongoose

MongoDB object modeling designed to work in an asynchronous environment.
JavaScript
26,622
star
2

wp-calypso

The JavaScript and API powered WordPress.com
JavaScript
12,359
star
3

_s

Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
CSS
10,849
star
4

node-canvas

Node canvas is a Cairo backed Canvas implementation for NodeJS.
JavaScript
9,820
star
5

kue

Kue is a priority job queue backed by redis, built for node.js.
JavaScript
9,434
star
6

simplenote-electron

Simplenote for Web, Windows, and Linux
TypeScript
4,517
star
7

juice

Juice inlines CSS stylesheets into your HTML source.
JavaScript
3,037
star
8

pocket-casts-android

Pocket Casts Android 🎧
Kotlin
2,440
star
9

cli-table

Pretty unicode tables for the CLI with Node.JS
JavaScript
2,243
star
10

expect.js

Minimalistic BDD-style assertions for Node.JS and the browser.
JavaScript
2,098
star
11

simplenote-ios

Simplenote for iOS
Swift
1,976
star
12

monk

The wise MongoDB API
JavaScript
1,845
star
13

knox

S3 Lib
JavaScript
1,738
star
14

simplenote-android

Simplenote for Android
Java
1,688
star
15

jetpack

Security, performance, marketing, and design tools β€” Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
PHP
1,550
star
16

pocket-casts-ios

Pocket Casts iOS app 🎧
Swift
1,464
star
17

simplenote-macos

Simplenote for macOS
Swift
1,420
star
18

antiscroll

OS X Lion style cross-browser native scrolling on the web that gets out of the way.
JavaScript
1,079
star
19

wp-desktop

WordPress.com for Desktop
981
star
20

WP-Job-Manager

Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
PHP
874
star
21

browser-repl

Launch a repl on your command line to any browser in the cloud.
JavaScript
728
star
22

themes

Free WordPress themes made by Automattic for WordPress.org and WordPress.com.
CSS
693
star
23

legalmattic

Democratizing WordPress.com legalese since 2014!
672
star
24

wpcom.js

WordPress.com JavaScript API client designed for Node.js and browsers
JavaScript
658
star
25

Picard

A prototype theme that uses React and WP-API
CSS
631
star
26

fb-instant-articles

Archived (see Readme). Enable Facebook Instant Articles on your WordPress site.
PHP
628
star
27

sensei

Sensei LMS - Online Courses, Quizzes, & Learning
PHP
514
star
28

developer

In your WordPress, developing locally
PHP
470
star
29

wordpress-activitypub

ActivityPub for WordPress
PHP
442
star
30

theme-components

A collection of patterns for creating a custom starter WordPress theme.
PHP
404
star
31

wp-super-cache

WP Super Cache: A fast caching engine for WordPress
PHP
399
star
32

Edit-Flow

WordPress plugin to accelerate your editorial workflow
PHP
341
star
33

o2

The o2 plugin for WordPress β€” blogging at the speed of thought
JavaScript
332
star
34

newspack-plugin

An advanced open-source publishing and revenue-generating platform for news organizations.
PHP
310
star
35

liveblog

Liveblogging done right. Using WordPress.
PHP
304
star
36

batcache

A memcached HTML page cache for WordPress.
PHP
278
star
37

Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
PHP
275
star
38

newspack-theme

A theme for Newspack.
PHP
265
star
39

vip-quickstart

Retired
PHP
265
star
40

Iris

A(n awesome) Color Picker
JavaScript
257
star
41

babble

Multilingual WordPress done right.
PHP
244
star
42

syntaxhighlighter

WordPress plugin that makes it easy to post syntax-highlighted code snippets.
CSS
237
star
43

VIP-Coding-Standards

PHP_CodeSniffer ruleset to enforce WordPress VIP coding standards.
PHP
210
star
44

underscores.me

PHP
209
star
45

newspack-blocks

Gutenberg blocks for the Newspack project.
PHP
193
star
46

isolated-block-editor

Repackages Gutenberg's editor playground as a full-featured multi-instance editor that does not require WordPress.
CSS
192
star
47

custom-metadata

A WordPress plugin that provides an easy way to add custom fields to your object types (post, pages, custom post types, users)
PHP
191
star
48

camptix

Moved to https://github.com/WordPress/wordcamp.org/
PHP
182
star
49

browserbuild

JavaScript
170
star
50

woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
PHP
162
star
51

vip-go-mu-plugins

The development repo for mu-plugins used on the WordPress VIP Platform.
PHP
158
star
52

Documattic

WordPress presentations and resources shared by WordPress.com VIP
JavaScript
156
star
53

google-docs-add-on

Publish to WordPress from Google Docs
JavaScript
152
star
54

mydb

JavaScript
150
star
55

vip-scanner

Deprecated: Scan all sorts of themes and files and things! Use PHPCS and the VIP coding standards instead
PHP
140
star
56

wp-memcached

Memcached Object Cache for WordPress.
PHP
139
star
57

Genericons

A public mirror of changes to the Genericon release.
CSS
136
star
58

regenerate-thumbnails

WordPress plugin for regenerating thumbnails of uploaded images. Over 1 million active users and counting.
PHP
131
star
59

media-explorer

With Media Explorer, you can now search for tweets and videos on Twitter and YouTube directly from the Add Media screen in WordPress.
PHP
124
star
60

Rewrite-Rules-Inspector

WordPress plugin to inspect your rewrite rules.
PHP
123
star
61

PhpStorm-Resources

PhpStorm is making inroads at Automattic. Here you'll find various helpful files we've made.
123
star
62

wordbless

WorDBless allows you to use WordPress core functions in your PHPUnit tests without having to set up a database and the whole WordPress environment
PHP
122
star
63

vip-go-mu-plugins-built

The generated repo for mu-plugins used on the VIP Go platform.
PHP
120
star
64

social-logos

A repository of all the social logos we use on WordPress.com
JavaScript
119
star
65

Cron-Control

A fresh take on running WordPress's cron system, allowing parallel processing
PHP
116
star
66

block-experiments

A monorepo of Block Experiments
JavaScript
114
star
67

genericons-neue

Genericons Neue are generic looking icons, suitable for a blog or simple website
HTML
114
star
68

nginx-http-concat

WordPress plugin to perform CSS and JavaScript concatenation of individual script files into one resource request.
PHP
114
star
69

php-thrift-sql

A PHP library for connecting to Hive or Impala over Thrift
PHP
113
star
70

wp-e2e-tests

Automated end-to-end tests for WordPress.com
JavaScript
112
star
71

ad-code-manager

Easily manage the ad codes that need to appear in your templates
PHP
112
star
72

woocommerce-services

WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes automated tax rates and the ability to purchase and print USPS shipping labels.
JavaScript
104
star
73

es-backbone

ElasticSearch Backbone library for quickly building Faceted Search front ends.
JavaScript
103
star
74

syndication

Syndicate your WordPress content.
PHP
102
star
75

theme-tools

Tools for making better themes, better.
JavaScript
99
star
76

mShots

Website Thumbnail/Snapshot Service
JavaScript
94
star
77

prefork

PHP class for pre-loading heavy PHP apps before serving requests
PHP
94
star
78

phpcs-neutron-standard

A set of phpcs sniffs for PHP >7 development
PHP
93
star
79

newspack-newsletters

Author email newsletters in WordPress
PHP
89
star
80

musictheme

A theme for bands and musicians that uses an experimental Gutenberg layout.
CSS
89
star
81

gutenberg-themes-sketch

A set of Sketch files to help you design block-driven WordPress themes.
88
star
82

zoninator

Curation made easy! Create "zones" then add and order your content straight from the WordPress Dashboard.
PHP
85
star
83

cloudup-cli

cloudup command-line executable
JavaScript
83
star
84

go-search-replace

πŸš€ Search & replace URLs in WordPress SQL files.
Go
81
star
85

lazy-load

Lazy load images on your WordPress site to improve page load times and server bandwidth.
JavaScript
77
star
86

gutenberg-ramp

Control conditions under which Gutenberg loads - either from your theme code or from a UI
PHP
75
star
87

measure-builds-gradle-plugin

Gradle Plugin for reporting build time metrics.
Kotlin
74
star
88

auto-update

Objective-C
73
star
89

wpes-lib

WordPress-Elasticsearch Lib
PHP
73
star
90

vip-go-skeleton

The base repository structure for all VIP Go sites
PHP
72
star
91

msm-sitemap

Comprehensive sitemaps for your WordPress VIP site. Joint collaboration between Metro.co.uk, WordPress VIP, Alley Interactive, Maker Media, 10up, and others.
PHP
70
star
92

jurassic.ninja

A frontend to launching ephemeral WordPress instances that auto-destroy after some time
PHP
69
star
93

gutenberg-block-styles

An example of a simple plugin that adds a block style to Gutenberg.
PHP
68
star
94

atd-chrome

After the Deadline extension for Chrome
JavaScript
66
star
95

wp-api-console

WordPress (.com and .org) API Console written in React/Redux
JavaScript
66
star
96

eventbrite-api

The Eventbrite API plugin brings the power of Eventbrite to WordPress, for both users and developers.
PHP
65
star
97

mongo-query

mongo query API component
JavaScript
65
star
98

site-logo

Add a logo to your WordPress site. Set it once, and all themes that support it will display it automatically.
PHP
65
star
99

vip-go-nextjs-skeleton

A Next.js boilerplate for decoupled WordPress on VIP.
TypeScript
65
star
100

newspack-popups

AMP-compatible popup notifications.
PHP
61
star