Published
Edited
Feb 22, 2021
1 fork
5 stars
Insert cell
Insert cell
feather = require("feather-icons") // https://www.npmjs.com/package/feather-icons
Insert cell
Insert cell
Insert cell
leadContent = `[${feather.icons.feather.toSvg()}](https://feathericons.com "Homepage") is a collection of **${Object.keys(feather.icons).length}** MIT-licensed icons by Cole Bemis et al.`
Insert cell
listAlphabetically = () => {
let table = `
|24px|16px|Name|Description|
|:--:|:--:|:---|:----------|
`;

for (const [name, icon] of Object.entries(feather.icons)) {
const nativelySized = icon.toSvg(); // each icon is designed on a 24x24 grid
const smallerSized = icon.toSvg({ width: 16, height: 16 });
const description = icon.tags.join(", ");
table += `|${nativelySized}|${smallerSized}|${name}|${description}|\n`;
}
return md`${table}`;
}
Insert cell
html`<style>
th,
td {
padding: 4px;
}

.feather {
vertical-align: middle;
}

a .feather {
stroke: #c4c4c4; /* Observable's moon-gray */
}

a:hover .feather {
stroke: #3b5fc0; /* Observable's blue */
}
</style>`
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more