Get any logo from a domain.
Get Started
Β·
Report Bug
Favicon gets icons for any domain name.
To start using Faviconic install it using npm
or yarn
.
yarn add faviconic
or
npm install faviconic --save
Faviconic is very simple to use. Just import the getIcon
function and you are good to go.
import { getIcon } from "faviconic"
const { url } = getIcon("yahoo.com"); // just the domain
const { url } = getIcon("https://yahoo.com") // with the protocol
const { url, size } = getIcon("yahoo.com") // with icon size
// size: { width: 512, height: 512 }
When using getIcon
the following options are available:
-
targetSize
: If multiple icons are found, the icon closest to this size will be selected. Defaults to512
, value is in pixels.
Here is an example with the default value for each option:
const { url } = getIcon("yahoo.com", {
targetSize: 512
})
Distributed under the MIT License. See LICENSE
for more information.