import React, { useState, useEffect } from 'react'; import Head from 'next/head'; import { Icon, InlineIcon, addIcon, loadIcons, getIcon } from '@iconify/react'; // Use Iconify to render logo addIcon('logo', { width: 283, height: 64, body: '', }); // Icon to test generating unique IDs const iconDataWithID = { body: '', width: 128, height: 128, }; export default function Home() { const [data, setData] = useState(null); useEffect(() => { const unsubscribe = loadIcons(['carbon:home'], (loaded) => { const data = getIcon('carbon:home'); if (data) { setData(data); } }); return unsubscribe; }); return (
Create Next App

Welcome to Next.js!

Get started by editing pages/index.js

Documentation

Find in-depth information about Next.js features and API.

Learn

Learn about Next.js in an interactive course with quizzes!

Examples

Discover and deploy boilerplate example Next.js projects.

Deploy

Instantly deploy your Next.js site to a public URL with Vercel.

Iconify demo

Home icons:

Icons to test unique ids:{' '}

Testing 'carbon:home': {data ? ' icon is ' + data.width + ' x ' + data.height + ' ' : ' loading...'} {data && }

); }