Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Material Icon in react native with expo? #46

Open
KeflemTrindade opened this issue Apr 26, 2023 · 1 comment
Open

How to use Material Icon in react native with expo? #46

KeflemTrindade opened this issue Apr 26, 2023 · 1 comment

Comments

@KeflemTrindade
Copy link

I would like to use the icons listed here https://fonts.google.com/icons?icon.set=Material+Icons, no expo react native.

@marella
Copy link
Owner

marella commented May 1, 2023

I haven't used react-native or expo but it looks like it is possible to import SVGs directly using react-native-svg-transformer library. See expo docs.

Once you install and configure react-native-svg-transformer library you will be able to import Material Icons SVGs which are available in the @material-design-icons/svg package. You can import and use them as:

import Face from '@material-design-icons/svg/filled/face.svg';

<Face />;

There is an example for React in the README but the usage should be similar for React Native. Please let me know if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants