Class MaterialIcon
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Material아이콘
모든 Google Font Icons를 지원하는 객체입니다.
Google Workspace 부가기능 및 Google Chat 앱에서 사용할 수 있습니다.
const materialIcon = CardService.newMaterialIcon()
.setName('search')
.setFill(true)
.setWeight(400)
.setGrade(0);
자세한 문서
setFill(fill)
아이콘이 채워진 상태로 렌더링되는지 여부입니다. 기본값은 false
입니다.
다양한 아이콘 설정을 미리 보려면 Google 글꼴 아이콘으로 이동하여 맞춤설정에서 설정을 조정합니다.
const materialIcon =
CardService.newMaterialIcon().setName('search').setFill(true);
매개변수
이름 | 유형 | 설명 |
fill | Boolean | 아이콘이 채워져 있는지 여부입니다. |
리턴
MaterialIcon
: 연결을 위한 객체입니다.
setGrade(grade)
두께와 등급은 기호의 두께에 영향을 미칩니다. 등급 조정은 두께 조정보다 세분화되어 있으며 기호 크기에 미치는 영향이 적습니다. {-25, 0, 200} 중에서 선택합니다. 없는 경우 기본값은 0입니다. 다른 값을 지정하면 기본값이 사용됩니다.
다양한 아이콘 설정을 미리 보려면 Google 글꼴 아이콘으로 이동하여 맞춤설정에서 설정을 조정합니다.
const materialIcon =
CardService.newMaterialIcon().setName('search').setGrade(200);
매개변수
이름 | 유형 | 설명 |
grade | Integer | 아이콘의 등급입니다. |
리턴
MaterialIcon
: 연결을 위한 객체입니다.
setName(name)
아이콘의 이름을 설정합니다. 필수 항목입니다.
Google 글꼴 아이콘에 정의된 아이콘 이름입니다(예: check_box
).
잘못된 이름은 삭제되고 빈 문자열로 대체되며 아이콘이 렌더링되지 않습니다.
const materialIcon = CardService.newMaterialIcon().setName('search');
매개변수
이름 | 유형 | 설명 |
name | String | 아이콘의 이름입니다. |
리턴
MaterialIcon
: 연결을 위한 객체입니다.
setWeight(weight)
아이콘의 획 두께입니다. {100, 200, 300, 400, 500, 600, 700} 중에서 선택하세요. 없는 경우 기본값은 400입니다. 다른 값을 지정하면 기본값이 사용됩니다.
다양한 아이콘 설정을 미리 보려면 Google 글꼴 아이콘으로 이동하여 맞춤설정에서 설정을 조정합니다.
const materialIcon =
CardService.newMaterialIcon().setName('search').setWeight(700);
매개변수
이름 | 유형 | 설명 |
weight | Integer | 아이콘의 획 두께입니다. |
리턴
MaterialIcon
: 연결을 위한 객체입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eMaterialIcon\u003c/code\u003e objects allow you to use and customize \u003ca href=\"https://fonts.google.com/icons\"\u003eGoogle Font Icons\u003c/a\u003e within Google Workspace Add-ons and Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize the icon's appearance by setting its fill, grade, name, and weight using methods like \u003ccode\u003esetFill()\u003c/code\u003e, \u003ccode\u003esetGrade()\u003c/code\u003e, \u003ccode\u003esetName()\u003c/code\u003e, and \u003ccode\u003esetWeight()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the \u003ca href=\"https://fonts.google.com/icons\"\u003eGoogle Font Icons\u003c/a\u003e website to preview different icon settings and find valid icon names.\u003c/p\u003e\n"],["\u003cp\u003eWhen setting grade and weight, ensure you use the accepted values or the default values will be applied.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetName()\u003c/code\u003e method is required and uses the icon name as defined on the Google Font Icons website; using an invalid name will result in the icon not rendering.\u003c/p\u003e\n"]]],[],null,["# Class MaterialIcon\n\nMaterialIcon\n\nAn object that supports all [Google Font Icons](https://fonts.google.com/icons).\n\nAvailable for Google Workspace add-ons and Google Chat apps.\n\n```javascript\nconst materialIcon = CardService.newMaterialIcon()\n .setName('search')\n .setFill(true)\n .setWeight(400)\n .setGrade(0);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|------------------------------------------|-------------------|-----------------------------------------------|\n| [setFill(fill)](#setFill(Boolean)) | [MaterialIcon](#) | Whether the icon renders as filled. |\n| [setGrade(grade)](#setGrade(Integer)) | [MaterialIcon](#) | Weight and grade affect a symbol's thickness. |\n| [setName(name)](#setName(String)) | [MaterialIcon](#) | Sets the name of the icon. |\n| [setWeight(weight)](#setWeight(Integer)) | [MaterialIcon](#) | The stroke weight of the icon. |\n\nDetailed documentation\n----------------------\n\n### `set``Fill(fill)`\n\nWhether the icon renders as filled. Default value is `false`.\n\nTo preview different icon settings, go to [Google\nFont Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.\n\n```javascript\nconst materialIcon =\n CardService.newMaterialIcon().setName('search').setFill(true);\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|-----------|-----------------------------|\n| `fill` | `Boolean` | Whether the icon is filled. |\n\n#### Return\n\n\n[MaterialIcon](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Grade(grade)`\n\nWeight and grade affect a symbol's thickness. Adjustments to grade are more granular than\nadjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0,\n200}. If absent, default value is 0. If any other value is specified, the default value is\nused.\n\nTo preview different icon settings, go to [Google\nFont Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.\n\n```javascript\nconst materialIcon =\n CardService.newMaterialIcon().setName('search').setGrade(200);\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|---------|-----------|-------------------|\n| `grade` | `Integer` | The icon's grade. |\n\n#### Return\n\n\n[MaterialIcon](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Name(name)`\n\nSets the name of the icon. Required.\n\nThe icon name defined in [Google Font Icon](https://fonts.google.com/icons), For\nexample, `check_box`.\n\nAny invalid names are abandoned and replaced with an empty string and results in the icon\nfailing to render.\n\n```javascript\nconst materialIcon = CardService.newMaterialIcon().setName('search');\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|----------|-----------------------|\n| `name` | `String` | The name of the icon. |\n\n#### Return\n\n\n[MaterialIcon](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Weight(weight)`\n\nThe stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent,\ndefault value is 400. If any other value is specified, the default value is used.\n\nTo preview different icon settings, go to [Google\nFont Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.\n\n```javascript\nconst materialIcon =\n CardService.newMaterialIcon().setName('search').setWeight(700);\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|-----------|--------------------------------|\n| `weight` | `Integer` | The stroke weight of the icon. |\n\n#### Return\n\n\n[MaterialIcon](#) --- This object, for chaining."]]