Replies: 11 comments 25 replies
-
YES PLEASE |
Beta Was this translation helpful? Give feedback.
-
I am thinking the same thing, since currently the whole font file is 2 Mb.. It would be very nice if Next.js able to filter out unused glyph at build time, and then give them the same treatment as next js font optimization flow as this thread suggest |
Beta Was this translation helpful? Give feedback.
-
While it may appear to be a convenient option, I am not certain that Next.js should recommend this approach. The main issue is that the In my opinion, there is no benefit to using an advanced solution like |
Beta Was this translation helpful? Give feedback.
-
Is there currently a way to use Material Symbols with the new app directory? In the pages directory I would add them with a |
Beta Was this translation helpful? Give feedback.
-
Here is my workaround
// icon.tsx
import Image from "next/image";
type Props = {
name: string;
width: number;
height: number;
fill?: boolean;
};
export default function Icon({ name, width, height, fill }: Props) {
const src = `/icons/${name}${fill ? "-fill" : ""}.svg`;
return <Image alt={name} width={width} height={height} src={src} />;
}
// page.tsx
import Icon from './Icon'; // Adjust the import path as per your project structure
export default function Page() {
return (
<div>
<h1>Icon Examples</h1>
<Icon name="heart" width={32} height={32} fill />
<Icon name="star" width={32} height={32} />
</div>
);
}; What are the downsides ?
But it works :) Thank you very much and I agree we all of u guys. |
Beta Was this translation helpful? Give feedback.
-
HI, Guys. You can use this material-icons in Nextjs v13 from this Google repo material-design-icons, it is simple and quickly. |
Beta Was this translation helpful? Give feedback.
-
For those using Tailwind, you can independently override variable font axes with CSS custom properties and Tailwind arbitrary properties, like so:
References: |
Beta Was this translation helpful? Give feedback.
-
The simplest workaround is to implement a CSS file /public/globalIcon.css and import the icon URL from the google font using the following code: Then, import the CSS file and use it as normal:
|
Beta Was this translation helpful? Give feedback.
-
Desperately need this through next/font. Reason? All the other listed techniques cause FoUC (Flash of Unstyled Content). I need the fonts to be delivered alongside the first page load. Preferably SSR/SSG compatible. |
Beta Was this translation helpful? Give feedback.
-
If there's someone from the maintainers who can review this PR and push it forward: #68507 I'd really appreciate it! |
Beta Was this translation helpful? Give feedback.
-
May 2025 and still dreaming about material design icons feature for next/font/google.... |
Beta Was this translation helpful? Give feedback.
-
Describe the feature you'd like to request
@next/font/google
to allow the loading of Material SymbolsWhat are Material Symbols?
As Google states:
Describe the solution you'd like
Describe alternatives you've considered
The only solution, for now, is to add this to the
head
of the document.Beta Was this translation helpful? Give feedback.
All reactions